logo separator

[mkgmap-dev] Naming natural=peak with ref=*

From Stéphane MARTIN st3ph.martin at laposte.net on Sat Oct 22 16:09:04 BST 2016

Thank you very much Carlos.

All is right now :-)

Best regards.
Steph

Le 22/10/2016 à 13:46, Carlos Dávila a écrit :
> El 22/10/16 a las 12:51, Stéphane MARTIN escribió:
>> Hi,
>>
>> I have a problem naming a "natural=peak" when the node has also a
>> "ref=*".
>>
>> e.g.:
>> <node id="669975855" version="2" timestamp="2011-10-30T18:15:24Z"
>> uid="191786" user="bulzor14" changeset="9696614" lat="44.0979812"
>> lon="6.1389134">
>>      <tag k="description" v="Borne SGA - Point vu en place en 1981"/>
>>      <tag k="ele" v="1140.02"/>
>>      <tag k="man_made" v="survey_point"/>
>>      <tag k="name" v="Pic d'Oise"/>
>>      <tag k="natural" v="peak"/>
>>      <tag k="note" v="Ne pas déplacer ce point, cf. - Do not move this
>> node, see -
>> http://wiki.openstreetmap.org/wiki/WikiProject_France/Repères_Géodésiques#Permanence_des_rep.C3.A8res"/>
>>
>>      <tag k="ref" v="0404701 - A"/>
>>      <tag k="source" v="©IGN 2010 dans le cadre de la cartographie
>> réglementaire"/>
>>      <tag k="url"
>> v="http://ancien-geodesie.ign.fr/fiche_point.asp?num_site=0404701&no_ptg=01&numero_f50=3441"/>
>>
>>    </node>
>>
>> The problem is that the "ref" appears before the peak's name, even if
>> deleted in the points file.
>> My points file says:
>> natural=peak & ref=* {delete ref}
>> natural=peak {name '${name} (${ele} m)' | '${name}'} [0x6616
>> resolution 22]
>>
>> N.B.: "man_made=survey_point" is not set in the points file.
>>
>> The result is, e.g. "0404701 - a Pic D'Oise" and not "Pic D'Oise
>> 1140.02 M".
>>
>> Any ideas ?
>>
>> Best regards.
>> Steph
>> _______________________________________________
> 
> Your problem is caused by inc/name file in style, which adds ref to peak
> name before you delete it. You should add a line like
> 
> natural=peak & ref=* { delete ref; }
> 
> to your inc/name file.
> 
> By the way, I think last lines of the following two rules in inc/name
> file of default style could be deleted, as previous one will always
> match. I'm I right?
> 
> operator=* & brand!=* {
>  name '${operator}: ${ref} ${name}' |
>       '${operator}: ${name}' |
>       '${operator}: ${ref}' |
>       '${operator}' |
>       '${ref}'
> }
> 
> brand=* & operator!=* {
>  name '${brand}: ${ref} ${name}' |
>       '${brand}: ${name}' |
>       '${brand}: ${ref}' |
>       '${brand}' |
>       '${ref}'
> }



More information about the mkgmap-dev mailing list