<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Pete,
<blockquote type="cite"
cite="mid:CACkcqcVe1TiWNEiP9bzjkLJDXBo7L-xcmcxs9hqXdy5MVDTrHA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div>How do I specify such a query using the OGR PG driver as
a Mapserver layer to be used as a TILEINDEX of OGR vector
files? <br>
</div>
</div>
</div>
</blockquote>
A potential solution would be to create a OGR VRT file that contains
your SQL request, and reference that VRT file in the TILEINDEX<br>
<br>
<OGRVRTDataSource><br>
<OGRVRTLayer name="layer"><br>
<SrcDataSource>PG:"host='localhost' user='postgres'
dbname='mydatabase' password='mypwd'</SrcDataSource><br>
<SrcSQL>SELECT * FROM testtable</SrcSQL><br>
<p></OGRVRTDataSource></p>
<p>Actually you may be able to inline the VRT file as the TILEINDEX
value (it is a bit tricky regarding quoting however, but there's
an example of that in
<a class="moz-txt-link-freetext" href="https://mapserver.org/input/vector/VirtualSpatialData.html">https://mapserver.org/input/vector/VirtualSpatialData.html</a> as the
value of CONNECTION, not TILEINDEX, but that shouldn't make a
difference)), since the OGR VRT XML content can be used as a valid
OGR dataset name.<br>
</p>
<blockquote type="cite"
cite="mid:CACkcqcVe1TiWNEiP9bzjkLJDXBo7L-xcmcxs9hqXdy5MVDTrHA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div>Perhaps this is more of a GDAL question... or how does
Mapserver's use of OGR TILEINDEX of OGR vector files allow
custom SQL? Note that as a TILEINDEX of Rasters the
TILEINDEX can point to a Mapserver Layer, so I /can/ add
custom SQL queries in that case. But I don't know how to do
it as a OGR TILEINDEX pointing to OGR vectors.</div>
</div>
</div>
</blockquote>
<p>For vector layer, it doesn't look like it is possible to have
TILEINDEX pointing to a MapServer vector layer (contrary to
rasters), at least I can't see any related tests in mapserver
regression test suite<br>
</p>
<p>Even</p>
<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>