
Please can someone advise: I have an OSM file which contains contours with elevations in metres. Mapsource seems to interpret these as feet, and then, because I have its altitude setting in metres, converts them. So they all come out low by a factor of 3.3. Is there a way of adjusting for this in the style file? Thanks in advance, Roger -- ------------------------------------------------------------------------ Roger Calvert ------------------------------------------------------------------------

Am 15.11.2012 14:43, schrieb Roger Calvert:
Please can someone advise:
I have an OSM file which contains contours with elevations in metres. Mapsource seems to interpret these as feet, and then, because I have its altitude setting in metres, converts them. So they all come out low by a factor of 3.3.
Is there a way of adjusting for this in the style file?
Thanks in advance,
Roger -- ------------------------------------------------------------------------
Roger Calvert ------------------------------------------------------------------------
Hi Roger I had a similar problem with peaks. I've edited/added the following lines in the points file. natural=peak & ele=* {name '${name|def:} (${ele|def:})' | '${name}' } [0x6616 resolution 20] natural=peak & ele!=* {name '${name|def:}' } [0x6616 resolution 20] Hope this helps. Thomas

this works for me: contour=elevation { name '${ele|conv:m=>ft}'} Am 15.11.2012 19:55, schrieb Thomas Kaschel:
Am 15.11.2012 14:43, schrieb Roger Calvert:
Please can someone advise:
I have an OSM file which contains contours with elevations in metres. Mapsource seems to interpret these as feet, and then, because I have its altitude setting in metres, converts them. So they all come out low by a factor of 3.3.
Is there a way of adjusting for this in the style file?
Thanks in advance,
Roger -- ------------------------------------------------------------------------
Roger Calvert ------------------------------------------------------------------------
Hi Roger
I had a similar problem with peaks. I've edited/added the following lines in the points file.
natural=peak & ele=* {name '${name|def:} (${ele|def:})' | '${name}' } [0x6616 resolution 20] natural=peak & ele!=* {name '${name|def:}' } [0x6616 resolution 20]
Hope this helps.
Thomas _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Thomas and Michael, Thank you for your suggestions. Both these contain elements which I have not met before - conv: and def: - and which do not appear on the wiki page http://wiki.openstreetmap.org/wiki/Mkgmap/help/style_rules. Can you point me to somewhere where they are defined? I have tested them both. Michael's suggestion (conv:) works and solves my problem. Mapsource obviously recognises contours explicitly, and converts the elevation and displays the units according to the preferences setting. It does not appear to do this for peaks. With Thomas's suggestion (def:), Mapsource labels all the contours 'Invalid Elevation'. With many thanks, Roger On 15/11/2012 19:05, michael lohr wrote:
this works for me:
contour=elevation { name '${ele|conv:m=>ft}'}
Am 15.11.2012 19:55, schrieb Thomas Kaschel:
Am 15.11.2012 14:43, schrieb Roger Calvert:
Please can someone advise:
I have an OSM file which contains contours with elevations in metres. Mapsource seems to interpret these as feet, and then, because I have its altitude setting in metres, converts them. So they all come out low by a factor of 3.3.
Is there a way of adjusting for this in the style file?
Thanks in advance,
Roger -- ------------------------------------------------------------------------
Roger Calvert ------------------------------------------------------------------------
Hi Roger
I had a similar problem with peaks. I've edited/added the following lines in the points file.
natural=peak & ele=* {name '${name|def:} (${ele|def:})' | '${name}' } [0x6616 resolution 20] natural=peak & ele!=* {name '${name|def:}' } [0x6616 resolution 20]
Hope this helps.
Thomas _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- ------------------------------------------------------------------------ Roger Calvert ------------------------------------------------------------------------

i got it from the mkgmap default style. i never thought much about it, because it just worked. but i'm wondering now why the converion is necessary at all, because the altitude is written as the name of the contour line. aren't names just strings? Am 16.11.2012 11:35, schrieb Roger Calvert:
Thomas and Michael,
Thank you for your suggestions. Both these contain elements which I have not met before - conv: and def: - and which do not appear on the wiki page http://wiki.openstreetmap.org/wiki/Mkgmap/help/style_rules. Can you point me to somewhere where they are defined?
I have tested them both. Michael's suggestion (conv:) works and solves my problem. Mapsource obviously recognises contours explicitly, and converts the elevation and displays the units according to the preferences setting. It does not appear to do this for peaks.
With Thomas's suggestion (def:), Mapsource labels all the contours 'Invalid Elevation'.
With many thanks,
Roger
On 15/11/2012 19:05, michael lohr wrote:
this works for me:
contour=elevation { name '${ele|conv:m=>ft}'}
Am 15.11.2012 19:55, schrieb Thomas Kaschel:
Am 15.11.2012 14:43, schrieb Roger Calvert:
Please can someone advise:
I have an OSM file which contains contours with elevations in metres. Mapsource seems to interpret these as feet, and then, because I have its altitude setting in metres, converts them. So they all come out low by a factor of 3.3.
Is there a way of adjusting for this in the style file?
Thanks in advance,
Roger -- ------------------------------------------------------------------------
Roger Calvert ------------------------------------------------------------------------
Hi Roger
I had a similar problem with peaks. I've edited/added the following lines in the points file.
natural=peak & ele=* {name '${name|def:} (${ele|def:})' | '${name}' } [0x6616 resolution 20] natural=peak & ele!=* {name '${name|def:}' } [0x6616 resolution 20]
Hope this helps.
Thomas _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- ------------------------------------------------------------------------
Roger Calvert ------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On 16/11/2012 15:14, michael lohr wrote:
i got it from the mkgmap default style. i never thought much about it, because it just worked. but i'm wondering now why the converion is necessary at all, because the altitude is written as the name of the contour line. aren't names just strings? I don't think so - according to the default contours_ft style, "# Contours take their name from the elevation setting.". But their names change according to 'preferences/units' in MapSource. For example, in changing from metres to feet, '250' changes to '820' and the mouseover name changes from '250 m' to '820 ft'. I imagine the same will apply on the GPS unit, but it doesn't seem to happen for peaks. Also, if the 'ele' value of a contour is non-numeric, MapSource complains about it.
Roger ------------------------------------------------------------------------
participants (3)
-
michael lohr
-
Roger Calvert
-
Thomas Kaschel