Gtfs shapes.txt coordinate precision


#1

The coordinates in the static gtfs shapes.txt are like -33.8832170090139. That’s 13 decimal places, according to https://en.wikipedia.org/wiki/Decimal_degrees 6 decimal places is ~10cm, which is probably as accurate as you need for this file, even 5 decimal places will still give ~1m precision.

Trimming the coordinate precision will make the file sizes smaller, easier to work with, faster to download etc. Similarly the shape_dist_traveled seems to be over precise as well.

What are your thoughts on this?


#2

Hmm, that’s interesting! Which bundle are you looking at? I can only see 7 decimal points for bus and train shapes.txt and stops.txt in the GTFS-R bundle.


#3

Hmm, that’s interesting! Which bundle are you looking at? I can only see 7 decimal points for bus and train shapes.txt and stops.txt in the GTFS-R bundle.

This is in the static file at https://opendata.transport.nsw.gov.au/direct/full_greater_sydney_gtfs_static.zip but also in the shape.txt at https://api.transport.nsw.gov.au/v1/publictransport/timetables/complete/gtfs


#4

Interesting! All our data does come from various operational systems so it could be a legacy thing but it could be worthwhile looking into.

@david.phillips thoughts?


#5

Yep, it looks like the static GTFS bundle is being overly precise. Good timing as we are doing a review of our exporter, maybe we can trim this down.