logo separator

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

From WanMil wmgcnfg at web.de on Tue May 14 19:16:04 BST 2013

It's just a *quick test* to show how and if an overview map might 
benefit from removing single directions from motorways.

As I wrote it's not meant to be committed. So remove the [PATCH v1] and 
replace it with [Demonstration v1] :-)

Of course any combination of things might happen and I have already seen 
that both directions are removed which results in a hole :-(

In the meantime I found another easy way to remove one direction of 
motorways. In Germany all motorways belong to a TMC relation. One 
direction belongs to the TMC relation with TMC:Direction=positive. The 
other to TMC:Direction=negative. This tag could be copied by the 
relations style file to the motorway way and could then be used instead 
of the angle() rules to decide if the motorway should be used in the 
overview map. But I don't know if the relations are also complete for 
other countries. I guess it's not...

So I think this kind of merging could be better done in the "after" 
style processing. Maybe in the LineMergeFilter which could get the 
capability to also compare the names and the tags of the lines.

WanMil


> 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-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 .org
>
>>> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>
>>
>> _______________________________________________
>> mkgmap-dev mailing list
>
>> mkgmap-dev at .org
>
>> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>
>
>
> --
> View this message in context: http://gis.19327.n5.nabble.com/PATCH-v1-Remove-one-direction-of-motorways-in-overview-tp5760869p5761017.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
>



More information about the mkgmap-dev mailing list