<div dir="ltr"><div dir="ltr">On Wed, Dec 7, 2022 at 1:16 AM Schylberg Lars <<a href="mailto:lars.schylberg@saabgroup.com">lars.schylberg@saabgroup.com</a>> wrote:<br></div><div dir="ltr">> The important thing is to have a one layer for the actual tile index, that has status off and one layer that is using the tile index layer.<br><div><br></div><div>Thanks for the message, Lars!  This gave me another idea to debug.  </div><div><br></div><div>When I set DEBUG 5 and request </div><div><br></div><div>     mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson'<br></div><div><br></div><div>then the log contains</div><div><br></div><div><div>    OGROPen(tindex_ogr)<br></div><div>    msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr'.  File not found or unsupported format. Check server logs.<br></div><div>    Open failed for OGR connection in layer `vector_via_ogr'.</div></div><div><br></div><div>with the layers</div><div>    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></div><div><br></div><div>    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></div><div><br></div><div>This log line</div><div><br></div><div>        OGROPen(tindex_ogr)</div><br class="gmail-Apple-interchange-newline"><div>makes me suspect the following lines of code are setting the OGR dataset name to "tindex_ogr", whereas I expect it to do something like use the value from CONNECTION in the layer with name "tindex_ogr". <br></div><div><a href="https://github.com/MapServer/MapServer/blob/71ecf4028b0769027df3a970a36d56feb1d46ab6/mapogr.cpp#L1205-L1238">https://github.com/MapServer/MapServer/blob/71ecf4028b0769027df3a970a36d56feb1d46ab6/mapogr.cpp#L1205-L1238</a><br></div><div><br></div><div>In other words, I expect the log line to read<br></div><div><br></div><div>        OGROPen(/app/mapfiles/tindex.geojson)</div><div><br></div><div>and not</div><div><br></div><div>        OGROPen(tindex_ogr)<br class="gmail-Apple-interchange-newline"></div><div><br></div><div>This seems to be unique for a vector tile index of vectors.  This otherwise works fine when using a vector tileindex of rasters.  So if I make a bogus raster layer like</div><div><br></div><div>    LAYER<br>        DEBUG 5<br>        NAME "bogus_raster"<br>        TYPE RASTER<br>        TILEINDEX tindex_ogr<br>        STATUS OFF<br>        PROJECTION<br>            "init=epsg:3857"<br>        END<br>    END<br></div><div><br></div><div>and then issue a bogus request like</div><div><br></div><div>    curl '<a href="http://localhost:8000/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&map=/app/mapfiles/test2.map&layers=bogus_raster&WIDTH=256&HEIGHT=256&CRS=EPSG:3857&STYLES=&BBOX=4163066.308523841,5943743.319455305,4167958.2783340923,5948635.289265556">http://localhost:8000/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&map=/app/mapfiles/test2.map&layers=bogus_raster&WIDTH=256&HEIGHT=256&CRS=EPSG:3857&STYLES=&BBOX=4163066.308523841,5943743.319455305,4167958.2783340923,5948635.289265556</a>'<br></div><div><br></div><div>Then the log line includes</div><div><br></div><div>     msOGRFileOpen(/app/mapfiles/tindex.geojson)...<br>     OGROPen(/app/mapfiles/tindex.geojson)<br>     msConnPoolRegister(tindex_ogr,/app/mapfiles/tindex.geojson,0x556aba222630)<br></div><div><br></div><div>and _not_ </div><div><br></div><div>     msOGRFileOpen(tindex_ogr)...<br></div><div><br></div><div>like I see for a vector tile index of vectors.</div><div><br></div><div>Thanks, Pete</div></div></div>