[OSM-dev] adding custom symbology into the map generation process?

Peter Körner osm-lists at mazdermind.de
Wed Aug 18 16:50:44 BST 2010

Am 18.08.2010 15:48, schrieb Ákos Maróy:
> thus, it seems my custom tag of aviation_area=danger is omitted in the
> import.
First, there's in normal use cases no need to query planet_osm_ways, 
planet_osm_nodes and planet_osm_rels -- they're for internal use by 
osm2pgsql's slim mode.

Use planet_osm_line, planet_osm_polygon and planet_osm_point, these are 
the tables that the mapnik style uses.

Next, osm2pgsql will throw any tags away that aren't listed in the style 
file. The default style file looks like [1]. For your case it would be 
the easiest way to add the columns needed for your style to this file 
and specify it on the osm2pgsql command line.

>> To add your own rendering rules, look at the osm.xml after running
>> generate_xml.py. It includes a whole set of other styles (located in the
>> inc/ directory). You can include your own styles that way, too (or, if
>> you're in a hurry, just copy'n'past your own styles into osm.xml).
> I'm looking at the osm.xml file, and it seems that each layer has an
> elaborate<Datasource>...</Datasource>  definition, with queries on the
> planet_osm_roads, _polygon, etc. tables, which seem to have special
> columns, seemengly created out of the key-value pairs of the imported
> data. but here again, my custom key is not listed there.
See above.

> is there something special I have to do for the process to take my
> custom tag into account?
Yes, see above.



More information about the dev mailing list