mapnik-org/mapnik — Issue #137: Ability to specify geometry field for postgis plugin
Author: artemp
Created: 2011-10-11 07:37:40+00:00
State: open
Labels: PostGIS_Input_Driver

If a table has multiple geometry fields, mapnik will take the first one returned from querying `geometry_columns`.

The attached patch adds an optional `geometry_field` parameter to the postgis datasource constructor, so you can specify a specific column to use via (python example):
{{{
mylayer.datasource = mapnik.Datasource(
type = 'postgis',
table = 'test',
host = 'localhost',
dbname = 'test',
user = 'me',
password = 'me',
geometry_field = 'other_geom')
}}}