On Wed, Mar 24, 2021 at 1:47 AM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> perhaps OGR connection to PostGIS would work better than the native one
> with tileindex.
>

I am trying to do this as a proof-of-concept tile index of vector files
where the geom is stored in a Postgis database.  Does anyone have
experience with the Postgres driver and a MapServer OGR layer?  I can get
OGR to read my database with something like this:

ogrinfo -ro PG:"host='db' user='test' dbname='testdb' password='123'" -sql
"SELECT id, geom FROM boundaries LIMIT 1"

# service=WFS&VERSION=1.1.0&REQUEST=getfeature&typename=example_layer
LAYER
    NAME example_layer
    TYPE POLYGON
    CONNECTIONTYPE OGR
    CONNECTION "host=db user=test dbname=testdb password=123"
END

I've tried passing the query (-sql "SELECT id, geom FROM boundaries LIMIT
1") in the CONNECTION string, as a separate DATA and also CONNECTIONOPTIONS
as in the ElasticSearch example in the docs
https://www.mapserver.org/input/vector/ogr.html However none of these
work.  How do you pass something like "-sql ..." to a MapServer layer of
type OGR?

Thanks!
Pete
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to