Update HRP geo file

This commit is contained in:
2019-03-06 22:27:32 +01:00
parent 2edba945c9
commit 49090d1416
3 changed files with 13692 additions and 2156 deletions

15833
geo/hrp.gpx

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,10 @@
<?php <?php
/**
* To convert a gpx file:
* 1. Add file <file_name>.gpx to geo/ folder
* 2. Assign file to project: UPDATE projects SET geofile = '<file_name>.geojson'
*/
class Converter extends PhpObject { class Converter extends PhpObject {
const GPX_EXT = '.gpx'; const GPX_EXT = '.gpx';

View File

@@ -1,5 +1,12 @@
<?php <?php
/**
* Feed Class
* Also takes care of spot (device) & messages
*
* To add a new feed, create a new records in the feed table:
* INSERT INTO feeds (ref_feed_id, id_spot, id_project) VALUES ('<feed_id>', '<related_spot_id>', '<related_project_id>');
*/
class Feed extends PhpObject { class Feed extends PhpObject {
//Spot feed //Spot feed
@@ -20,7 +27,6 @@ class Feed extends PhpObject {
private $iFeedId; private $iFeedId;
private $sRefFeedId; private $sRefFeedId;
private $iLastUpdate; private $iLastUpdate;
public function __construct(Db &$oDb, $iFeedId) { public function __construct(Db &$oDb, $iFeedId) {
@@ -65,7 +71,7 @@ class Feed extends PhpObject {
if(!empty($asMsgs)) if(!empty($asMsgs))
{ {
//Update Spot Info //Update Spot Info from the first message
$asFirstMsg = array_values($asMsgs)[0]; $asFirstMsg = array_values($asMsgs)[0];
$asSpotInfo = array( $asSpotInfo = array(
'ref_spot_id' => $asFirstMsg['messengerId'], 'ref_spot_id' => $asFirstMsg['messengerId'],