
Hi WanMil, ok, got it. I don't find code that assures that there are two directions. Isn't that allowed? Gerd WanMil wrote
Hi Gerd,
the angle() function calculates the angle between start/end point of the way and one axis (to be honest I haven't check if it's the lat or lon axis...).
I don't need to check if the ways are parallel. For motorways I assume that there are two parallel ways. Using the angle method I select only one of both because one way has an angle >= 0° and the other < 0°. It's not working perfect but it's ok for a quick test if merging ways in the overview map benefits.
WanMil
Hi WanMil,
I would like to implement an isSimilar() methid as suggested by Steve: http://gis.19327.n5.nabble.com/ways-are-deleted-when-not-routable-tp5760424p...
but I don't understand how your function calculates an angle between just two points. I think I have to compare two bearings to find out if two lines are parallel?
Gerd
WanMil wrote
Attached patch gives a little try how we could remove the duplicate motorways in the overview map. Usually both directions of a motorway are painted on each other.
The patch removes all motorway segments from the overview map that span an angle 0° to 180° between first and last point of a segment.
It should not be commited because I think we could do better with a specialized filter (?) but it's an easy prototype to check if it's worthy to start such an implementation.
WanMil
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
motorway_undup_v1.patch (4K) <http://gis.19327.n5.nabble.com/attachment/5760869/0/motorway_undup_v1.patch&...;
-- View this message in context: http://gis.19327.n5.nabble.com/PATCH-v1-Remove-one-direction-of-motorways-in... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/PATCH-v1-Remove-one-direction-of-motorways-in... Sent from the Mkgmap Development mailing list archive at Nabble.com.