[OSM-talk] My maps have no content!

Joseph Gentle josephg at gmail.com
Fri Sep 12 05:03:25 BST 2008


Hi!

I'm trying to render some openstreetmap tiles using the instructions here:
http://wiki.openstreetmap.org/index.php/Mapnik

... However, the tiles keep rendering with none of the OSM data. They have
all the world boundaries just fine; but no streets.

My database seems fine - it has a bunch of data in it and mapnik sure seems
to be talking to the database.

Does anyone have any ideas? I've tried using different tile data sets (just
the australia set, or using the planet data set then importing a bounding
box from it).

Is there any nice way to get more debugging information out of mapnik? If
the queries were failing I assume it would bitch and moan...

-J


-------------- the technical details -----------------

I'm doing it on a gentoo box using postgresql 8.0.15, mapnik 0.5.1 and
postgis 1.3.1

Mapnik said this when it compiled:

# scons/scons.py
scons: Reading SConscript files ...
Building on Linux ...
Checking for C library m... (cached) yes
Checking for C library ltdl... (cached) yes
Checking for C library png... (cached) yes
Checking for C library tiff... (cached) yes
Checking for C library z... (cached) yes
Checking for C library jpeg... (cached) yes
Checking for C library proj... (cached) yes
Checking for C library iconv... (cached) no
Checking for C library pq... (cached) yes
Checking for C++ library gdal... (cached) no
Checking for C++ library boost_filesystem-mt... (cached) yes
Checking for C++ library boost_regex-mt... (cached) yes
Checking for C++ library boost_iostreams-mt... (cached) yes
Checking for C++ library boost_program_options-mt... (cached) yes
Checking for C++ library boost_thread-mt... (cached) yes
Bindings Python version... 2.5


I created the postgresql database with user 'osm' database name 'gis':

$ psql -U osm -d gis
Welcome to psql 8.0.15, the PostgreSQL interactive terminal.

gis=> \d
              List of relations
 Schema |        Name        | Type  | Owner
--------+--------------------+-------+-------
 public | geometry_columns   | table | osm
 public | planet_osm_line    | table | osm
 public | planet_osm_point   | table | osm
 public | planet_osm_polygon | table | osm
 public | planet_osm_roads   | table | osm
 public | spatial_ref_sys    | table | osm
(6 rows)


Imported the data:
$ ~/osm2pgsql/osm2pgsql -c -m -d gis -U osm -b 151.0,-33.5,151.25,-33.0
planet-080813.osm.bz2
osm2pgsql SVN version 0.55-20080908 $Rev: 10464 $

Using projection SRS 900913 (Spherical Mercator)
Applying Bounding box: 151.000000,-33.500000 to 151.250000,-33.000000
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Mid: Ram, scale=100

Reading in file: planet-080813.osm.bz2
Processing: Node(258575k) Way(20937k) Relation(20k)
Node stats: total(258575105), max(287470135)
Way stats: total(20937069), max(26250748)
Relation stats: total(20627), max(27504)

Writing way(1614k)


.... Which is in my database:

gis=> SELECT count(*) FROM planet_osm_point;
 count
-------
    37
(1 row)

gis=> SELECT count(*) FROM planet_osm_line;
 count
-------
    76
(1 row)

gis=> SELECT count(*) FROM geometry_columns;
 count
-------
     4
(1 row)


setup the set-mapnik-env thing:
export MAPNIK_DBNAME='gis'
export MAPNIK_DBUSER='osm'

$ rm -rf ../tiles && ./generate_tiles.py
render_tiles( (151.0, -33.5, 151.25, -33.0) /mnt/raid/work/maps/osm.xml
/mnt/raid/work/maps/tiles/ 12 12 aus )
aus [ 12 - 12 ]:  12 3766 2446 p: (150.99609375, -33.063924198120638)
(151.083984375, -32.990235559651069)
aus [ 12 - 12 ]:  12 3766 2447 p: (150.99609375, -33.137551192346145)
(151.083984375, -33.063924198120638)
aus [ 12 - 12 ]:  12 3766 2448 p: (150.99609375, -33.21111647241684)
(151.083984375, -33.137551192346145)
aus [ 12 - 12 ]:  12 3766 2449 p: (150.99609375, -33.284619968887682)
(151.083984375, -33.21111647241684)
...... and the generated tiles have no content!


I had debugging on in my postgresql server so I could see the queries.

LOG:  connection received: host=[local] port=
LOG:  connection authorized: user=osm database=gis
^-- mapnik connects
LOG:  statement: select asbinary(way) as geom,"highway","tunnel" from
(select * from planet_osm_line order by z_order) as roads where way &&
setSRID('BOX3D(16823484.17745415 -3957603.576493287,16843052.05669516
-3938035.697252281)'::box3d,900913)
^-- a bunch of things like this. Its clearly talking to the database


... Then I can replay the queries:

gis=> select asbinary(way) as geom,"highway","tunnel" from (select * from
planet_osm_line order by z_order) as roads where way &&
setSRID('BOX3D(16823484.17745415 -3957603.576493287,16843052.05669516
-3938035.697252281)'::box3d,900913)
....
(38 rows)

And I clearly get data for at least some of the queries.


So whats going wrong ?! I don't get it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20080912/e2d5489a/attachment.html>


More information about the talk mailing list