[Linpha-cvs] SF.net SVN: linpha: [4851] trunk/linpha2/lib
Status: Inactive
Brought to you by:
bzrudi
From: <bz...@us...> - 2008-02-04 13:52:34
|
Revision: 4851 http://linpha.svn.sourceforge.net/linpha/?rev=4851&view=rev Author: bzrudi Date: 2008-02-04 05:52:22 -0800 (Mon, 04 Feb 2008) Log Message: ----------- fixe exiftool gps data import Modified Paths: -------------- trunk/linpha2/lib/classes/linpha.metadata.class.php trunk/linpha2/lib/modules/module.geodata.php trunk/linpha2/lib/plugins/maps/xml_parser.class.php Modified: trunk/linpha2/lib/classes/linpha.metadata.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.metadata.class.php 2008-02-02 16:43:14 UTC (rev 4850) +++ trunk/linpha2/lib/classes/linpha.metadata.class.php 2008-02-04 13:52:22 UTC (rev 4851) @@ -950,17 +950,17 @@ /** * Lower array data to make it compareable to $metaTags */ - //$lowerDataArray = array_change_key_case($dataArray, 'LOWER_CASE'); + $lowerDataArray = array_change_key_case($dataArray, 'LOWER_CASE'); //echo '<pre>', print_r($lowerDataArray), '</pre>'; foreach($this->getDefaultMetaTags('gps') AS $key => $value) { - if(array_key_exists($value, $dataArray)) + if(array_key_exists($value, $lowerDataArray)) { $str_columns .= str_replace("_", "-", $value) . ', '; - $str_values .= "'".trim($dataArray[$value])."', "; + $str_values .= "'".trim($lowerDataArray[$value])."', "; } } /** @@ -1004,14 +1004,21 @@ if(is_array($dataArray)) { + /** + * Lower array data to make it compareable to $metaTags + */ + + $lowerDataArray = array_change_key_case($dataArray, 'LOWER_CASE'); + foreach($this->getDefaultMetaTags('gps') AS $key => $value) { - if(array_key_exists($value, $dataArray)) + if(array_key_exists($value, $lowerDataArray)) { $str_columns .= str_replace("_", "-", $value) . ', '; - $str_values .= "'".trim($dataArray[$value])."', "; + $str_values .= "'".trim($lowerDataArray[$value])."', "; } } + /** * Remove last two signs (the comma and the space) which we add to much */ Modified: trunk/linpha2/lib/modules/module.geodata.php =================================================================== --- trunk/linpha2/lib/modules/module.geodata.php 2008-02-02 16:43:14 UTC (rev 4850) +++ trunk/linpha2/lib/modules/module.geodata.php 2008-02-04 13:52:22 UTC (rev 4851) @@ -21,6 +21,18 @@ if (!defined('LINPHA_DIR')) { exit (1); } include_once LINPHA_DIR.'/lib/plugins/maps/xml_parser.class.php'; +$urlFull = LINPHA_LINK.'&linCat=geodata'; + +$linpha->template->setModuleName('geodata'); +//$linpha->template->overrideModule('head','map'); +$linpha->template->URL_full = $urlFull; +$linpha->template->URL_base = $urlFull; +$linpha->template->output['title'] = i18n("Geodata"); +include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); + + + + $GPXData = new LinXmlParser('/tmp/sample.gpx'); $array_with_gpx = $GPXData->readXmlFile(); $track_times = $GPXData->getGpxTimeRange($array_with_gpx); Modified: trunk/linpha2/lib/plugins/maps/xml_parser.class.php =================================================================== --- trunk/linpha2/lib/plugins/maps/xml_parser.class.php 2008-02-02 16:43:14 UTC (rev 4850) +++ trunk/linpha2/lib/plugins/maps/xml_parser.class.php 2008-02-04 13:52:22 UTC (rev 4851) @@ -136,7 +136,7 @@ } /** - * This method checks for start and end date/time for the gpx file + * This method checks for start and end date/time from the gpx file * @param array with all trkpt informtion from file * @return array (starttime, endtime); * @author bzrudi @@ -174,7 +174,7 @@ } /** - * This method checks parses all images in folder and get's start and + * This method parses all images in folder and get's start and * end date/time. * @param int parent_id for images to parse * @return array (starttime, endtime); @@ -410,7 +410,7 @@ } /** - * This method is mainly a wrapper function for trkptradar() which does + * This method is mainly a wrapper function for trkptRadar() which does * the main work when finding nearest trackpoint * @param array $images with all data read from the files * @author bzrudi @@ -528,6 +528,8 @@ ($lon > 0) ? $lonref = "E" : $latref = "W"; ($lat > 0) ? $latref = "N" : $latref = "S"; + // 0 = Above Sea Level + // 1 = Below Sea Level ($ele > 0) ? $eleref = "0" : $eleref = "1"; echo "Latref ".$latref." Longref ".$lonref."<br><br>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |