Add PCT tracks and update converter to include GPX simplication

This commit is contained in:
2019-11-23 19:10:40 +01:00
parent c3090f5286
commit 5afb60da5d
6 changed files with 107252 additions and 26 deletions

View File

@@ -39,7 +39,7 @@ class Spot extends Main
array('name'=>'feed', 'project'=>true),
array('name'=>'project', 'project'=>true),
array('name'=>'media', 'project'=>true),
array('name'=>'converter', 'project'=>true)
array('name'=>'converter', 'project'=>true)
);
parent::__construct($oClassManagement, $sProcessPage, $asClasses, true, __FILE__, $sTimezone);
@@ -315,7 +315,7 @@ class Spot extends Main
Db::getId(Project::PROJ_TABLE) => $this->oProject->getProjectId(),
'name' => mb_strtolower(trim($sName)),
'content' => trim($sPost),
'site_time' => date(Db::TIMESTAMP_FORMAT) //site time (Settings::TIMEZONE)
'site_time' => date(Db::TIMESTAMP_FORMAT) //site time (Settings::TIMEZONE)
);
$iPostId = $this->oDb->insertRow(self::POST_TABLE, $asData);
return self::getJsonResult(($iPostId > 0), '');
@@ -361,6 +361,10 @@ class Spot extends Main
return self::getJsonResult($bSuccess, $sDesc, array('values'=>$this->oProject->getProject()));
}
public function convertGpxToGeojson($sGeoFileName) {
return Converter::convertToGeoJson($sGeoFileName);
}
public static function decToDms($dValue, $sType) {
if($sType=='lat') $sDirection = ($dValue >= 0)?'N':'S'; //Latitude