<div dir="ltr"><div>Hi,</div><div><br></div><div>How do I get a vector tileindex working with another Mapserver layer as the tileindex?</div><div><br></div><div>I have the following tindex.geojson:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><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]]]}}]}</div></blockquote><div><br></div><div>Which points to a single file /app/mapfiles/test.geojson:</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><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></blockquote></div><div><br></div><div>I would like to define the TILEINDEX as one MapServer Layer and have another MapServer layer reference that tile index.  I tried this layer:</div><div><br></div><div>  LAYER<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>but when I run `mapserv -nh QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson'`, I get the following error:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">"msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `vector_via_ogr&#39;.  File not found or unsupported format. Check server logs."</blockquote><div><br></div><div>If I run without CONNECTIONTYPE OGR, I get the following error:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>"msTiledSHPOpenFile(): Shapefile error. Tileindex layer must be a shapefile."</div></blockquote><div><br></div><div>I can get a similar thing working for a TILEINDEX of rasters. However I cannot get it working on a TILEINDEX of vectors.  The example below is the simplest reproduce case I could create.  Ultimately I plan on having a TILEINDEX point to a layer of defined via CONNECTIONTYPE postgis. </div><div><br></div><div><div>How do I get a vector tileindex working with another Mapserver layer as the tileindex?</div><div></div></div><div><br></div><div><div>Thanks!</div><div>Pete</div><div><br></div></div><div><br></div><div>Full mapfile below with example commands reproducing my errors.<br></div><div><br></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>DEBUG 5<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>    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&#39;.  File not found or unsupported format. Check server logs.'<br>  LAYER<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>