transitland / transitland-datastore

Transitland v1 core components. Deprecated and only maintained occasionally. See Transitland v2.
https://transit.land/documentation/datastore/
MIT License
105 stars 18 forks source link

convex_hull buffer for small geometry collections #1076

Open slvlirnoff opened 7 years ago

slvlirnoff commented 7 years ago

For geometries collection of less than 3 elements, the datastore adds a buffer of 100 lat/lon to the generated convex_hull. (https://github.com/transitland/transitland-datastore/blob/master/app/models/concerns/has_a_geographic_geometry.rb#L27)

This seems very high and make operator bounding box very hard to use/covers half the planet.

Is there a specific reason for such a high value? I've tested with a buffer of 0.1 and it does look much nicer on mobility explorer.

For feeds like switzerland official where there's a bit more than an hundred operators with 2 stops (ski lift for instance or funicular) it'd seems quite good to revisit that number.

irees commented 7 years ago

Hello again @slvlirnoff !

I think the intention was 100m -- I will look into it and make an adjustment if necessary.