<div dir="ltr"><div dir="ltr">On Wed, Mar 24, 2021 at 1:47 AM Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="FI" style="overflow-wrap: break-word;">
<div class="gmail-m_-2423159844152656633WordSection1">
<p class="MsoNormal">perhaps OGR connection to PostGIS would work better than the native one with tileindex.</p></div></div></blockquote><div><br></div><div>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:</div><div><br></div><div>ogrinfo -ro PG:"host='db' user='test' dbname='testdb' password='123'" -sql "SELECT id, geom FROM boundaries LIMIT 1"<br></div><div><br></div><div># service=WFS&VERSION=1.1.0&REQUEST=getfeature&typename=example_layer</div><div>LAYER<br>    NAME example_layer<br>    TYPE POLYGON<br></div><div>    CONNECTIONTYPE OGR</div><div>    CONNECTION "host=db user=test dbname=testdb password=123" <br></div><div>END</div><div><br></div><div>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 <a href="https://www.mapserver.org/input/vector/ogr.html">https://www.mapserver.org/input/vector/ogr.html</a> However none of these work.  How do you pass something like "-sql ..." to a MapServer layer of type OGR? </div><div><br></div><div>Thanks!</div></div><div dir="ltr" class="gmail_signature">Pete</div></div>