[MapProxy] PostGIS on seeding

Jorge Gaspar Sanz Salinas jsanz at osgeo.org
Fri Aug 26 06:28:06 EDT 2011


El 26/08/11 11:42, Oliver Tonnhofer escribió:
> 
> On 26.08.2011, at 11:04, Jorge Gaspar Sanz Salinas wrote:
>> All samples at documentation about using OGR for coverages are with
>> Shapefiles so I don't know how to specify the table name on coverage
>> configuration.
> 
> You can add a full select statement to ogr_where.
> 
>> That is to say, any working example of ogr_datasource with PostGIS?
> 
> Untested, but it should work like that.
> 
> views:
>  germany:
>    ogr_datasource: "PG:\"dbname='db' host='myhostname' user='user' password='passwd'\""
>    ogr_where: "select * from countries where name='germany'"
>    ogr_srs: 'EPSG:900913'
>    level: [0, 14]
>    srs: ['EPSG:900913', 'EPSG:4326']
> 
> Note that you need to escape the double quotes inside the double quotes.
> 
> Regards,
> Oliver
> 


Thanks Oliver, I have it working with this snippet

coverages:
  db:
    ogr_datasource: "PG: dbname='db' host='host' user='user'
password='passowrd'"
    ogr_where: 'select * from coverages where date is null'
    ogr_srs: 'EPSG:23030'

Now I'm testing if it supports multypoligons on geometries :-)

Thanks!!

-- 
Jorge Gaspar Sanz Salinas
http://es.osgeo.org
http://jorgesanz.net


More information about the MapProxy mailing list