[OSM-dev] Problems with own Mapnik installation
Jon Burgess
jburgess777 at googlemail.com
Sat Jun 20 20:28:36 BST 2009
On Sat, 2009-06-20 at 21:08 +0200, Nils Bermann wrote:
> The problem is, that in different scales (bbox to image size) colours
> of
> the ways changes and finally some ways vanish. Those vanishing are as
> far
> as I can see highways except tracks and bridges for all kinds of
> highways.
>
> To illustrate the problem I put together a small document:
> http://home.mnet-online.de/nils9/mapnik_problem.html
> Data imported in the DB is just a cutout from the planet.osm, thus
> the
> empty world around the city.
>
> Is that a known effect and if yes, what is the remedy?
I think that can happen if you have a mismatch between the osm.xml and
the columns in the DB. These columns are defined by the contents of the
default.style file used osm2pgsql.
You should have columns below in your DB:
$ psql gis
Welcome to psql 8.2.9, the PostgreSQL interactive terminal.
gis=> \d planet_osm_line
Table "public.planet_osm_line"
Column | Type | Modifiers
--------------------+----------+-----------
osm_id | integer |
access | text |
addr:flats | text |
addr:housenumber | text |
addr:interpolation | text |
admin_level | text |
aerialway | text |
aeroway | text |
amenity | text |
area | text |
barrier | text |
bicycle | text |
bridge | text |
boundary | text |
building | text |
construction | text |
cutting | text |
disused | text |
embankment | text |
foot | text |
highway | text |
historic | text |
horse | text |
junction | text |
landuse | text |
layer | text |
learning | text |
leisure | text |
lock | text |
man_made | text |
military | text |
motorcar | text |
name | text |
natural | text |
oneway | text |
power | text |
power_source | text |
place | text |
railway | text |
ref | text |
religion | text |
residence | text |
route | text |
service | text |
sport | text |
tourism | text |
tracktype | text |
tunnel | text |
waterway | text |
width | text |
wood | text |
z_order | integer |
way_area | real |
way | geometry |
Indexes:
"new2_line_index" gist (way)
"new2_line_pkey" btree (osm_id)
You can fetch the latest default.style from:
http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/default.style
Then you need to re-import data into the DB with osm2pgsql. By default
it expects default.style to be in the current working directory but you
can specify an alternate location with --style.
Jon
More information about the dev
mailing list