You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2011-04-27 13:58:49

Erlanger
Member
From: Erlangen (Germany)
Registered: 2010-07-06
Posts: 72

How to parse the mkgmap style files ?

http://wiki.openstreetmap.org/wiki/Mkgm … tyle_rules
describes the style rules that can be found inside the style files for mkgmap, e.g. the files lines, points, relations...
I would like to know, how these style files can be easily red by a parser?
Which parser would be able to read the format of these style files?
How does mkgmap work with these style files?
My aim is to use the sophisticated styles (e.g. OpenMTBMap, Wanderreitkarte) for the mkgmap renderer and "translate" these rules with a script/program to style files for other renderers like e.g. Maperitive, Kosmos, Mapnik...
Maybe it is too much effort to write this "translator" and it is quicker to write new style files for the renderer?
My goal is, that i will get better maps for outdoor use (Hiking, MTB) with an Android App and offline navigation.
I don't like most of the ready-made map tiles (for outdoor use) that can be downloaded with the Mobile Atlas Creator.
And neither the Android Apps nor Mobile Atlas Creator are able to render new map tiles with a user-defined style, they only use already rendered map tiles.

Offline

#2 2011-04-28 07:43:56

csdf
Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 313
Website

Re: How to parse the mkgmap style files ?

I think all the style processing in mkgmap is done in the osmstyle section:
http://www.mkgmap.org.uk/svn/wsvn/mkgma … /osmstyle/
You should read this code if you want to know how mkgmap does it.

Offline

#3 2011-04-28 09:14:36

Erlanger
Member
From: Erlangen (Germany)
Registered: 2010-07-06
Posts: 72

Re: How to parse the mkgmap style files ?

Thanks for the direct link to the svn repository.
I assume, this will get a bit more difficult to understand how mkgmap handle the sytle files hmm

Offline

#4 2011-04-30 23:03:42

aighes
Member
From: Shanghai
Registered: 2009-03-29
Posts: 5,383
Website

Re: How to parse the mkgmap style files ?

mkgmap-style files are something like a dictionary between osm-tags and Garmin-IDs. For your parser you will also need the corresponding TYP-file, which contains the info how a Garmin-ID will be drawn.


Viele Grüße
Henning

Offline

Board footer

Powered by FluxBB