########################################################################################## GPXIN-26: Calculate Min/Max Lat and Lon and add to Stats ########################################################################################## Issue Type: New Feature ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Minor Status: Closed Resolution: Done (2016-02-20 20:53:31) Project: PHP GPXIngest (GPXIN) Reported By: btasker Assigned To: btasker Affected Versions: - 1.02 Targeted for fix in version: - 1.02 Time Estimate: 0 minutes Time Logged: 32 minutes ----------------------------------------------------------------------------------------- Issue Description ================== Requested on Github as #7 Add new stats indicating the highest and lowest lat/lon pairs seen. ----------------------------------------------------------------------------------------- Issue Relations ================ - Github FR #7 (https://github.com/bentasker/PHP-GPX-Ingest/issues/7) ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2016-02-20 19:37:11 btasker ----------------------------------------------------------------------------------------- Need to know more about the use-case the user has in mind, do they want the actual coordinates for max/min (so an actual lat/lon pair) or are they simply interested in extracting the maximum/minimum recorded latitude - essentially meaning those stats properties will simply be decimal. One option might be to make the relevant stats property an object in itself, so we'd have something like -- BEGIN SNIPPET -- $stats->maxLon->Lon = 1234 $stats->maxLon->Lat = 4567 $stats->maxLat->Lon = 1134 $stats->maxLat->Lat = 5567 -- END SNIPPET -- Which would give the option of either, but then when retrieving it you'd have to do something like -- BEGIN SNIPPET -- $foo = $o->getStats('MaxLon'); echo $foo->Lon; -- END SNIPPET -- Which feels a bit ugly and un-necessary ----------------------------------------------------------------------------------------- 2016-02-20 19:40:32 ----------------------------------------------------------------------------------------- btasker changed priority from '[issuelistpty 3]Major[/issuelistpty]' to '[issuelistpty 4]Minor[/issuelistpty]' ----------------------------------------------------------------------------------------- 2016-02-20 19:49:57 btasker ----------------------------------------------------------------------------------------- The user has said they need square bounds on a per-file, per-track and per-segment basis. Makes sense, it'd allow you (for example) to easily extract the bounds to pass into Google Maps to ensure it's correctly centred around the track you're displaying. ----------------------------------------------------------------------------------------- 2016-02-20 19:51:08 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'In Progress' ----------------------------------------------------------------------------------------- 2016-02-20 20:17:09 btasker ----------------------------------------------------------------------------------------- Commit _6d9e313_ implements bounds calculations for the overall file, and also on a per-segment basis, so we just need to calculate per-track now. ----------------------------------------------------------------------------------------- 2016-02-20 20:17:17 ----------------------------------------------------------------------------------------- btasker changed status from 'In Progress' to 'Open' ----------------------------------------------------------------------------------------- 2016-02-20 20:17:30 git ----------------------------------------------------------------------------------------- -- BEGIN QUOTE -- Repo: PHP-GPX-Ingest Commit: 6d9e3135c22739399d46bd75f8a488da26455a72 Author: B Tasker