<div dir="ltr">Hi!<br><br>I'm trying to render some openstreetmap tiles using the instructions here:<br><a href="http://wiki.openstreetmap.org/index.php/Mapnik">http://wiki.openstreetmap.org/index.php/Mapnik</a><br><br>
... However, the tiles keep rendering with none of the OSM data. They have all the world boundaries just fine; but no streets.<br><br>My database seems fine - it has a bunch of data in it and mapnik sure seems to be talking to the database.<br>
<br>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).<br><br>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...<br>
<br>-J<br><br><br>-------------- the technical details -----------------<br><br>I'm doing it on a gentoo box using postgresql 8.0.15, mapnik 0.5.1 and postgis 1.3.1<br><br>Mapnik said this when it compiled:<br><br># scons/scons.py <br>
scons: Reading SConscript files ...<br>Building on Linux ...<br>Checking for C library m... (cached) yes<br>Checking for C library ltdl... (cached) yes<br>Checking for C library png... (cached) yes<br>Checking for C library tiff... (cached) yes<br>
Checking for C library z... (cached) yes<br>Checking for C library jpeg... (cached) yes<br>Checking for C library proj... (cached) yes<br>Checking for C library iconv... (cached) no<br>Checking for C library pq... (cached) yes<br>
Checking for C++ library gdal... (cached) no<br>Checking for C++ library boost_filesystem-mt... (cached) yes<br>Checking for C++ library boost_regex-mt... (cached) yes<br>Checking for C++ library boost_iostreams-mt... (cached) yes<br>
Checking for C++ library boost_program_options-mt... (cached) yes<br>Checking for C++ library boost_thread-mt... (cached) yes<br>Bindings Python version... 2.5<br><br><br>I created the postgresql database with user 'osm' database name 'gis':<br>
<br>$ psql -U osm -d gis<br>Welcome to psql 8.0.15, the PostgreSQL interactive terminal.<br><br>gis=> \d<br> List of relations<br> Schema | Name | Type | Owner <br>--------+--------------------+-------+-------<br>
public | geometry_columns | table | osm<br> public | planet_osm_line | table | osm<br> public | planet_osm_point | table | osm<br> public | planet_osm_polygon | table | osm<br> public | planet_osm_roads | table | osm<br>
public | spatial_ref_sys | table | osm<br>(6 rows)<br><br><br>Imported the data:<br>$ ~/osm2pgsql/osm2pgsql -c -m -d gis -U osm -b 151.0,-33.5,151.25,-33.0 planet-080813.osm.bz2 <br>osm2pgsql SVN version 0.55-20080908 $Rev: 10464 $ <br>
<br>Using projection SRS 900913 (Spherical Mercator)<br>Applying Bounding box: 151.000000,-33.500000 to 151.250000,-33.000000<br>Setting up table: planet_osm_point<br>Setting up table: planet_osm_line<br>Setting up table: planet_osm_polygon<br>
Setting up table: planet_osm_roads<br>Mid: Ram, scale=100<br><br>Reading in file: planet-080813.osm.bz2<br>Processing: Node(258575k) Way(20937k) Relation(20k)<br>Node stats: total(258575105), max(287470135)<br>Way stats: total(20937069), max(26250748)<br>
Relation stats: total(20627), max(27504)<br><br>Writing way(1614k)<br><br><br>.... Which is in my database:<br><br>gis=> SELECT count(*) FROM planet_osm_point;<br> count <br>-------<br> 37<br>(1 row)<br><br>gis=> SELECT count(*) FROM planet_osm_line;<br>
count <br>-------<br> 76<br>(1 row)<br><br>gis=> SELECT count(*) FROM geometry_columns;<br> count <br>-------<br> 4<br>(1 row)<br><br><br>setup the set-mapnik-env thing:<br>export MAPNIK_DBNAME='gis'<br>
export MAPNIK_DBUSER='osm'<br><br>$ rm -rf ../tiles && ./generate_tiles.py<br>render_tiles( (151.0, -33.5, 151.25, -33.0) /mnt/raid/work/maps/osm.xml /mnt/raid/work/maps/tiles/ 12 12 aus )<br>aus [ 12 - 12 ]: 12 3766 2446 p: (150.99609375, -33.063924198120638) (151.083984375, -32.990235559651069) <br>
aus [ 12 - 12 ]: 12 3766 2447 p: (150.99609375, -33.137551192346145) (151.083984375, -33.063924198120638) <br>aus [ 12 - 12 ]: 12 3766 2448 p: (150.99609375, -33.21111647241684) (151.083984375, -33.137551192346145) <br>
aus [ 12 - 12 ]: 12 3766 2449 p: (150.99609375, -33.284619968887682) (151.083984375, -33.21111647241684) <br>...... and the generated tiles have no content!<br><br><br>I had debugging on in my postgresql server so I could see the queries.<br>
<br>LOG: connection received: host=[local] port=<br>LOG: connection authorized: user=osm database=gis<br>^-- mapnik connects<br>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)<br>
^-- a bunch of things like this. Its clearly talking to the database<br><br><br>... Then I can replay the queries:<br><br>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)<br>
....<br>(38 rows)<br><br>And I clearly get data for at least some of the queries.<br><br><br>So whats going wrong ?! I don't get it.<br></div>