<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 8, 2022 at 12:55 AM Rahkonen Jukka <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg103169482701061253">
<div lang="FI" style="overflow-wrap: break-word;">
<div class="m_103169482701061253WordSection1">
<p class="MsoNormal"> <br></p>
<p class="MsoNormal"><span lang="EN-US">We are using the ”layer-as-a-tileindex” method right now with a bit older Mapserver version and with native POSTGIS connection type. In the orthophoto layer we use<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> </span> </p>
<p class="MsoNormal"><span lang="EN-US">I hope that this still works with Mapserver 8. It would be nice if you could make a test and compare OGR vs POSTGIS connection types.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <br></span></p></div></div></div></blockquote><div><br></div><div>This test is the closest I could find of ”layer-as-a-tileindex of vectors" that makes me think it should work: <a href="https://github.com/MapServer/MapServer/blob/1a45e6074b71738e576563ac39f60fd96ded50eb/msautotest/wxs/contour_tileindex.map#L70-L101">https://github.com/MapServer/MapServer/blob/1a45e6074b71738e576563ac39f60fd96ded50eb/msautotest/wxs/contour_tileindex.map#L70-L101</a> </div><div>What version of MapServer are you using? </div><div><br></div><div>Can you try this mapfile on your version of Mapserver?</div><div><br></div><div>### tindex.geojson</div><div>{ "type":"FeatureCollection","features":[{"type":"Feature","properties":{"location":"/app/mapfiles/test.geojson"},"geometry":{"type":"Polygon","coordinates":[[[122.013774753,29.96355712],[122.014247522,29.915620561],[122.06927508,29.916020438],[122.068828693,29.963957768],[122.013774753,29.96355712]]]}}]}<br></div><div><br></div><div>### test.geojson</div><div>{"type":"Feature","properties":{},"geometry":{"coordinates":[[[122.04067791363536,29.944772490597998],[122.03620089848994,29.94141730774004],[122.03819740524398,29.937852301951125],[122.0446709271447,29.938166866424368],[122.04648593328471,29.940211511256464],[122.04067791363536,29.944772490597998]]],"type":"Polygon"}}<br></div><div><br></div><div>### test2.map</div><div><br></div><div>MAP<br> OUTPUTFORMAT<br> NAME "geojson"<br> DRIVER "OGR/GEOJSON"<br> MIMETYPE "application/json; subtype=geojson"<br> FORMATOPTION "STORAGE=memory"<br> FORMATOPTION "FORM=SIMPLE"<br> FORMATOPTION "LCO:RFC7946=NO"<br> FORMATOPTION "FILENAME=result.json"<br> END<br><br> WEB<br> METADATA<br> "ows_enable_request" "*"<br> "wfs_getfeature_formatlist" "ogrgml,geojson"<br> END<br> END<br> CONFIG "MS_ERRORFILE" "stderr"<br><br> PROJECTION<br> "init=epsg:4326"<br> END<br><br><br> # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_directly&OUTPUTFORMAT=geojson'<br> # returns the contents of 'test.geojson'!<br> LAYER <br> NAME "vector_directly"<br> TYPE POLYGON<br> TILEINDEX "/app/mapfiles/tindex.geojson"<br> CONNECTIONTYPE OGR<br> STATUS OFF<br> END<br><br> # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=tindex_ogr&OUTPUTFORMAT=geojson'<br> # returns contents of tindex.geojson!<br> LAYER<br> DEBUG 5<br> NAME "tindex_ogr"<br> TYPE POLYGON<br> CONNECTIONTYPE OGR<br> CONNECTION "/app/mapfiles/tindex.geojson"<br> STATUS OFF<br> END<br><br> # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_tindex&OUTPUTFORMAT=geojson'<br> # returns 'msTiledSHPOpenFile(): Shapefile error. Tileindex layer must be a shapefile.'<br> LAYER<br> NAME "vector_via_tindex"<br> TYPE POLYGON<br> TILEINDEX tindex_ogr<br> STATUS OFF<br> END<br><br> # mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson'<br> # returns 'msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'. File not found or unsupported format. Check server logs.'<br> LAYER<br> DEBUG 5<br> NAME "vector_via_ogr"<br> TYPE POLYGON<br> TILEINDEX tindex_ogr<br> CONNECTIONTYPE OGR<br> STATUS OFF<br> END<br><br>END # mapfile<br></div><div><br></div></div></div>