[OSM-dev] Mapnik doesn't find geometry columns

Lennard ldp at xs4all.nl
Tue Jul 7 19:23:42 BST 2009


Hans Musil wrote:

> I'm running mapnik version 0.5.1 as shipped with Debian Lenny. Following 
> http://wiki.openstreetmap.org/wiki/Mapnik/Installation#For_Debian_Lenny_or_Sid, 
> this should be ready to work.

You might investigate if it's feasible for you to upgrade. Mapnik 0.6.0 
has been out for quite a while now, and 0.6.1 is imminent.

> the PostGIS db. The following tables are populated with reasonably 
> looking data:

I presume you also have the spatial_ref_sys table?

>                  | public         | planet_osm_line    | 
> way               |               2 | 900913 | LINESTRING

Mapnik 0.5.1 performs this query to find the geometry column, for 
instance for the line table:

select f_geometry_column,srid,type from geometry_columns where 
f_table_name='planet_osm_line';

Then picks up the f_geometry_column as the name of the geometry.

What does that return for you?

> select asbinary() as geom,"highway","railway" from

Hmm, weird. Why is your mapnik not also selecting "tunnel"? "tunnel" is 
used in the "roads" style filters.

> Now my big question: How do I explain mapnik that it has to use "way" as 
> geometry column?

As above: it should pick it up by itself.

-- 
Lennard




More information about the dev mailing list