<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Pete,</p>
    <p>actually this is documented in
      <a class="moz-txt-link-freetext" href="https://mapserver.org/input/vector/ogr.html#tileindex-with-ogr">https://mapserver.org/input/vector/ogr.html#tileindex-with-ogr</a> and
      tested in
<a class="moz-txt-link-freetext" href="https://github.com/MapServer/MapServer/blob/1a45e6074b71738e576563ac39f60fd96ded50eb/msautotest/wxs/wfs_ogr_tileindexmixedsrs.map">https://github.com/MapServer/MapServer/blob/1a45e6074b71738e576563ac39f60fd96ded50eb/msautotest/wxs/wfs_ogr_tileindexmixedsrs.map</a></p>
    <p>So for a OGR vector layer, the value of TILEINDEX must be a
      shapefile or a OGR datasource name, not a MapServer layer,
      contrary to raster support (contour layers use raster logic
      underneath).</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 08/12/2022 à 16:44, Peter Schmitt a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACkcqcVSAJE+_AP7Wk-a8vHyWpR+ZjPVmU8CkSVSj4hv4mU9Kw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
              moz-do-not-send="true" class="moz-txt-link-freetext">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 style="overflow-wrap: break-word;" lang="FI">
                <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</span></p>
                  <p class="MsoNormal"><span lang="EN-US"> </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.</span></p>
                  <p class="MsoNormal"><span lang="EN-US"> <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"
              moz-do-not-send="true" class="moz-txt-link-freetext">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&#39;.  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>
    </blockquote>
    <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>