logo separator

[mkgmap-dev] [locator] Country specific rules

From WanMil wmgcnfg at web.de on Thu May 19 22:15:05 BST 2011

> El 19/05/11 22:12, WanMil escribió:
>>> El 19/05/11 21:29, WanMil escribió:
>>>>> El 16/05/11 19:27, Minko escribió:
>>>>>> Cool!
>>>>>> I can use these locator rules also for the multiple language expressions in the 'default_name':
>>>>>> http://www.mail-archive.com/mkgmap-dev@lists.mkgmap.org.uk/msg07697.html
>>>>>>
>>>>>> Example:
>>>>>> leisure=pitch&       sport=soccer&       (mkgmap:country=NLD | mgkmap:region=Vlaanderen) [0x19 default_name="voetbalveld" resolution 23]
>>>>>> leisure=pitch&       sport=soccer&       mkgmap:country=DEU  [0x19 default_name="Fussballfeld" resolution 23]
>>>>>> leisure=pitch&       sport=soccer&       (mkgmap:country=FRA | mgkmap:region="Région Wallone") [0x19 default_name="terrain de football" resolution 23]
>>>>>> leisure=pitch&       sport=soccer [0x19 resolution 23]
>>>>> I tried rules of type below, but it doesn't work for Morocco.
>>>>> highway=primary&      (mkgmap:country=ETH | mkgmap:country=MAR) [0x03
>>>>> road_class=3 road_speed=5 resolution 16]
>>>>> highway=primary [0x03 road_class=3 road_speed=5 resolution 18]
>>>>>
>>>>> MapSouce shows "Morocco (MOR)" in the countries list, although
>>>>> LocatorConfig.xml has the rule below and there's no occurrence of "MOR"
>>>>> in the OSM data.
>>>>> <country name="Morocco" abr="MAR">
>>>>> <variant>MA</variant>
>>>>> <variant>MAR</variant>
>>>>> </country>
>>>>> I know I could use MOR instead of MAR in my style but, shouldn't it be
>>>>> consistent with the LocatorConfig?
>>>> It seems as if the LocatorConfig you changed is not used by mkgmap. Do
>>>> you use a downloaded mkgmap.jar? I am not sure where your changed
>>>> LocatorConfig.xml must be placed so that mkgmap does not use the bundled
>>>> LocatorConfig.xml.
>>> I have not changed LocatorConfig.xml, I'm using the default one. I use a
>>> self compiled jar.
>> Oh, I am sorry. I mixed up some things.
> Well, I'm must also say I'm sorry, as checking my parameters I've seen
> MOR was coming from my --country-abbr:-[ , but changing it to the right
> "MAR" didn't make the style work, although MapSource now lists "Morocco
> (MAR)"

That's good because this question is answered :-)

The style can work only if the boundaries of Morocco are contained in 
the precompiled boundary tiles. I think my europe compilation may 
contain a small part of northern morocco.
So you should do the following steps:
1. Check that the boundary multipolygon of Morocco is complete and valid
2. Precompile the boundary tiles
3. Compile your map again using the precompiled boundary tiles

Then the style rules should work.

WanMil

>> Do you use the default-country parameter?
> Using --country-name=MOROCCO
>> Do you have other maps installed in MapSource?
> Yes, more than 15
>> I have no idea at the moment why Morocco is abbreviated with MOR but I
>> will test that myself.
>>
>
>> WanMil
>>
>>>>>> "Région Wallone" is however not recognised, maybe the relation 90348 is not complete? JOSM is complaining about a few members without role.
>>>>>>
>>>>>> ----------
>>>>>> Wanmil wrote:
>>>>>>
>>>>>>> Just wondering, maybe we can use the locator rules also for country or state specific routing?
>>>>>>> For instance in some countries (like Germany (?) according to the access rules on osm, see http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access-Restrictions#Germany) one is allowed to cycle on trunk roads, while in other countries like in the Netherlands this is forbidden.
>>>>>>>
>>>>>>> In the style file maybe this is possible?
>>>>>>>
>>>>>>> mkgmap:country=NLD&        highway=trunk {add bicycle=no}
>> _______________________________________________
>> mkgmap-dev mailing list
>> mkgmap-dev at lists.mkgmap.org.uk
>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>




More information about the mkgmap-dev mailing list