chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
http://transition.city
MIT License
22 stars 13 forks source link

transition: TrRouting: round lat/lon instead of showing too many decimals #248

Open kaligrafy opened 3 years ago

kaligrafy commented 3 years ago

See roundLonLatCoordinates in src/utils/geometry/PointUtils.js

tahini commented 3 years ago

Where exactly should the lat/lon be rounded? In the TransitRoutingForm? Or in the results of batch routing? Or in TrRouting itself, as a filter for the results?

kaligrafy commented 3 years ago

In fact we should never store any lat lon with more than 6 decimals, as it is superfluous and takes memory in geojson files (the biggest precision lost with 6 decimals is around 0.1m) See this and this I propose that any geojson/database save should round to 6th decimal.