Open zerebubuth opened 8 years ago
Guessing we should have a minimum value of 3 instead of 1.
Ah, sorry, I wrote that in a misleading way: Currently there is no tolerance, and the value of 1.0 was just a "for example". We need to implement a new post-process filter (or modify the existing intercut one) to have the ability to do what is described here.
This doesn't affect the API, moving to v1.1
The post-process filters used for cutting roads against landuse will create very short segments if the road merely grazes the corner of a landuse area. Where a road follows the boundary of a landuse area, but isn't exactly collinear with it, then this can produce a "dashed line" effect, as can be seen below (near 14/37.7873/-122.1290).
It seems like it would be a good idea to have a (pixel-based) tolerance to ensure that short segments aren't created in the first place.
To avoid a situation where "inside" segments are just shorter than the tolerance but the "outside" ones are much shorter, the implementation may need to scan the geometries and merge from shortest to longest. As a concrete example, if the tolerance were 1.0 and the lengths of segments were:
[10.0 outside, 0.9 inside, 0.1 outside, 0.9 inside, 10.0 outside]
then the best output would probably be[10.0 outside, 1.9 inside, 10.0 outside]
rather than[21.9 outside]
.