GPXIN-34: Normalise attribute names



Issue Information

Issue Type: New Feature
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: PHP GPXIngest (GPXIN)
Resolution: Done (2017-07-04 12:19:11)
Target version: 1.03,

Created: 2017-07-04 10:16:25
Time Spent Working
Estimated:
 
45 minutes
Remaining:
  
24 minutes
Logged:
  
21 minutes


Description
As pointed out in Github #19 there's some inconsistency in attribute naming between routes and tracks.

In tracks we use "elevation" whereas in waypoint types we use "ele".

Need to look at making this consistent


Issue Links

Github #19
Documentation (bentasker.co.uk)
Toggle State Changes

Activity


I agree with the observation in #19 that as we have "lat" and "lon", "ele" probably makes more sense.

However, "elevation" has been used in tracks for quite some time, so simply changing it would break backwards-compatability (no matter how limited the size of the user base). So need to take that into account too.

Repo: PHP-GPX-Ingest
Commit: af54adae36e8d24f6962919046ba22e6e9e67b37
Author: B Tasker <github@<Domain Hidden>>

Date: Tue Jul 04 10:27:19 2017 +0100
Commit Message: GPXIN-34 - Normalise elevation attribute name in trackpoints to "ele"

To avoid break b/c, "elevation" remains valid but should be considered deprecated and will be removed at some point.

In a GPX file with 2100 trackpoints, having both set makes the serialised JSON approximately 8K larger.



Modified (-)(+)
-------
src/GPXIngest/GPXIngest.php




Webhook User-Agent

GitHub-Hookshot/18889e1


View Commit

Although the documentation is behind in plenty of other ways, I've updated it to refer to "ele" instead of "elevation" (and added a note to explain the latter is deprecated) so that if anyone does follow it they don't wind up using the older attribute.
btasker changed timespent from '0 minutes' to '21 minutes'
I think the main attributes are now all normalised:

- lat
- lon
- ele

So marking this as complete for now. Will raise a new issue if I find any I've missed.
btasker changed status from 'Open' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'

Work log


Ben Tasker
Permalink
2017-07-04 10:37:43

Time Spent: 21 minutes
Log Entry: Adding "ele" attribute to trackpoints, testing and updating docs