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

Ákos Maróy akos at maroy.hu
Wed Aug 18 14:48:33 BST 2010


> To import your own .osm file you'll need osm2pgsql in append mode
> (specify --append on the command line).

I tried, and it seems some data is left out of the import.

this is the osm XML file I have:

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6'>
  <node id="-6" lat="47.934167" lon="18.831667"/>
  <node id="-5" lat="47.883889" lon="18.765"/>
  <node id="-4" lat="47.8675" lon="18.865"/>
  <node id="-3" lat="47.884167" lon="18.931667"/>
  <node id="-2" lat="47.934167" lon="18.898333"/>
  <node id="-1" lat="47.934167" lon="18.831667"/>

  <way id="-7" visible="true">
    <nd ref="-1"/>
    <nd ref="-2"/>
    <nd ref="-3"/>
    <nd ref="-4"/>
    <nd ref="-5"/>
    <nd ref="-6"/>
    <nd ref="-1"/>
    <tag k="name" v="LHD34"/>
    <tag k="area" v="yes"/>
    <tag k="aviation_area" v="danger"/>


and this is what I have in the gis database after doing osm2pgsql:

# select * from planet_osm_ways where id = -7;
 id |         nodes          |         tags          | pending
 -7 | {-1,-2,-3,-4,-5,-6,-1} | {area,yes,name,LHD34} | f
(1 row)

thus, it seems my custom tag of aviation_area=danger is omitted in the

> 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.

is there something special I have to do for the process to take my
custom tag into account?


More information about the dev mailing list