[talk-au] mkgmap and matching mapnik styles and typ files

Brett Russell brussell237 at live.com.au
Sun Jul 21 06:34:04 UTC 2013


Thanks greatly to a fellow forum member I am making progress with mkgmap running on Windows 7.  But I have struck a problem.  mapnik uses an array of icons such as my favourite been the alpine_hut one.  To get this to work you need to feed the outcome of a style sheet into a type file to produce an img file else you are limited to the standard Garmin ones.  This means that the style file and typ file need to match else you get weird icons cropping up through the mismatch.  Now it is easy enough to get hold of the mapnik typ file but the matching style sheet has proven elusive, remarkably so given the normal ease of finding things on OSM.  

Now before someone yet again refers me to that "dreaded"  openmtb site I am looking to create Garmin maps that are optimised for Australian conditions not some European idea of mapping.  Goodness knows we know how little they understand our 4Wd issues and even less on our bushwalking ones!  By Australian conditions I mean ones that have zoom levels that hold huts, tracks and mountain in at 12km level.  Sure in Europe such zoom level detail would result in so much screen clutter as to be useless but we are living in a vast country.  I have by playing with the default style and using the mapnik style sheet to generate a better working map by altering the resolution levels.   

The results are getting there but rather than hand match the default mkgmap style to the mapnik style sheet that I have I am hoping that the matching style sheet exists and more importantly available rather than some covert commercialization attempt.  If it is commercial property then fine, I will develop my own style and typ sheets, just will take a longer time than starting with a combination that will produce mapnik styles that we are familiar with in our editing.

Also I have been looking at the mkgmap process and realizing that you can render a lot of things better.  A good example is the much debated 4wd issue.  Lets say we use default tags such as surface=unpaved and if you like 4wd_only=yes to keep in good with the European mappers but then use a new tag unpaved= 2wd-car, 2wd-high_clearance, 4wd-light, 4wd-heavy just as an example.  Then with the conditional command in the mkgmap style generate a hex code that is matched to a line type in the typ file.  Now the Norwegians are doing something similar with hiking trails.  If I am correct in my understanding of the mkgmap style and typ relationship the above should work.  It means that the standard maps will work as normal but specialised 4WD ones can exist.  It is similar to rivers.  For most people river, stream and intermittent=yes/no are fine.  But for a kayaker a water grade of 1 to 6 is used.  Most people would not want the river appearing in multiple colours for each grade but for a kayaker such information is important.  

As more and more people are realising there is no one map style to suit all purposes so let the Europeans be guardians of the generic styles but allow various interest groups to add sub types.  Trouble is the OSM_inspector will flag such subtypes as "invalid" but that is only a matter of what is allowed or not.  Heck, Polatch 2 ignored natural=peak while Polatch 1 supported this tag.

Anyway, first a reference to a match mapnik style and typ combinations would be great.  And secondly a discussion on using an unpaved=?,?,? type approach.  I will need to do some testing to see if my ideas will work as if they do not then it is just wishful thinking on my part.  I am will be picking on Urks Road as that starts 2wd_car, then 2wd high clearance, onto 4wd-light and finally needing a serious 4wd.  I prefer descriptive labels as grade 1 to 10 will need to be explained.  Sure, it is subjective but so is any grading system as even debates rage within government road managers on type A, B, and C roads.  

Cheers Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-au/attachments/20130721/6a35790e/attachment.html>

More information about the Talk-au mailing list