OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2012-10-10 01:11:09

mkgmap target specific ways

Can an mkgmap style rule filter by the actual way Id rather than just a tag?

I want to include certain cycle paths but only ones that I personally know that I want. In other words, just specific ones, not any that match a given criteria.

I could go in and add my own custom tag to the OSM database but I'm not sure whether that's deemed acceptable or not. Is it? If I prefix it with my username?

I've written my own patcher that can act on specific way IDs but the tile splitter keeps saying the resultant file is not a valid OSM file, although annoyingly it wont' tell me why and works fine on smaller areas (that contain ways that are patched.)

Offline

#2 2012-11-10 20:29:01

Re: mkgmap target specific ways

As you quite rightly say, it is very much frowned upon to alter tags to suit your needs!
As far as I can see, such a mkgmap filter cannot exist as it all depends on the highways you select.
However, there is nothing stopping you from parsing/rendering the osm so you can select your cycle paths ,give them additional tags and let mkgmap create an img.
Such a program would indeed be fairly straightfwd & v useful for many other editing reasons.

God forbid, OSM is here for ever, but if not, an editor that imports osm and allows for additions would I think be most welcoming!

Offline

#3 2012-11-12 20:28:55

Re: mkgmap target specific ways

Sadly, an entry like

id=189064367 [0x01 level 6]

in the line file of the style has no effect at all.
That means, you need an editor to add your tags to the ways, and then use "normal" rendering rules in mkgmap.
Please note that you'll have to update your file with line IDs from time to time, since ways can be split e.g. when "inserting" a brdge, or when adding part of it to a relation.

Offline

#4 2012-11-14 19:17:41

Re: mkgmap target specific ways

Another idea, some kind of overlay. When I create maps with elevation contour lines, the elevation data are in different files; when bridges are rendered, lines are added to both sides of the road. Now, let's combine these features with your requirements.
Start with extracting the ways you are interested in from the original data. Copy their tags, and also the nodes. Now test the newly created file by rendering it with mkgmap.
Next, change the ids of ways and nodes in your new file, and test again.
Then replace the original tags with a new tag. Adjust your rendering rules and style file, and test again.
Finally, have mkgmap working on both the original data (after splitter) and your new file. That should result in a "normal" map with your special ways shown in a special manner.

Offline

Board footer

Powered by FluxBB 1.4.8
Hosting sponsored by Oxilion