EastCoastGreenwayAlliance / ecg-map

Interactive map and trip planner for the ECGA
https://map.greenway.org
7 stars 0 forks source link

Route breaks, fill -- eg Fernandina to St Augustine #8

Closed gregallensworth closed 7 years ago

gregallensworth commented 7 years ago

In the routing demo, the route from Fernandina to St Augustine.

Reducing the snap tolerance from 0.004 to 0.002 reduces this effect by seeking closer snaps, but doesn't eliminate them completely.

Sorting the candidates by nearness of endpoint, could reduce this by causing it to look harder for snaps, but would be at odds with sorting the candidate paths by their "likely nearness" to the target and thus being more efficient in guessing routes.

In this specific case the added directions would have filled in the gap, with directions that a human would not have found useful: "parking lot" and "underpass" were the omitted segments. In this specific case, their omission was likely good... but I won't presume that that's always good.

gregallensworth commented 7 years ago

Same route, second condition:

Same as above, maybe the omission here is a good thing for readability, though the gaps in the line are unpleasant.

Continue further south, to the connection at Hayport Road:

Best solution here may be a cleanup which "connects" the two lines, by adding a new nameless segment or else by end-aligning the lines and faking their vertices to add a connection.

gregallensworth commented 7 years ago

image

One of the Hayport breaks. Question here is, whether we should have the router connect these ends to smooth things out.... given that that can cover up topology errors which folks may want to repair?

gregallensworth commented 7 years ago

image

Same Fernandina to St Augustine route, at St Johns River. The right-side one, connecting the ends to make a continuous line, would show a deviation from the path. (worse than that already caused by the ST_SIMPLIFY to clean up some flourish-crumbs).

gregallensworth commented 7 years ago

Got approval to go ahead and connect these.

gregallensworth commented 7 years ago

All set. If the gap between two segments is more than 0.0001 degrees, then the first point of the next segment is appended to the prior segment. Thus, the lines will always overlap and the effect is much smoother.