logo separator

[mkgmap-dev] [PATCH v1] Remove one direction of motorways in overview

From WanMil wmgcnfg at web.de on Tue May 14 18:55:53 BST 2013

The angle() function handles the oneway=-1 case.

> Hi WanMil,
>
> there is also the possibility, that both ways have the same direction
> and one way uses oneway=-1. Then you will get both or no way, or am I wrong?
>
> Henning
>
> Am 14.05.2013 19:29, schrieb WanMil:
>> 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-tp5760424p5760727.html
>>>
>>> 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 at .org
>>>
>>>> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>>
>>>> motorway_undup_v1.patch (4K)
>>>> &lt;http://gis.19327.n5.nabble.com/attachment/5760869/0/motorway_undup_v1.patch&gt;
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://gis.19327.n5.nabble.com/PATCH-v1-Remove-one-direction-of-motorways-in-overview-tp5760869p5760895.html
>>> Sent from the Mkgmap Development mailing list archive at Nabble.com.
>>> _______________________________________________
>>> mkgmap-dev mailing list
>>> mkgmap-dev at lists.mkgmap.org.uk
>>> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>
>>
>> _______________________________________________
>> mkgmap-dev mailing list
>> mkgmap-dev at lists.mkgmap.org.uk
>> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>



More information about the mkgmap-dev mailing list