[MapServer-users] Tileindex in format different than SHP?

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Wed Dec 14 04:01:03 PST 2022


Hi,

We should improve our documentation about tileindexes and differences between raster tileindex and OGR tileindex, and shapefile index and indexes using other formats. At least I do not find correct information easily even after using tileindexes for 15 years or more.

For rasters, if the tileindex in not SHP then user must first create a vector layer from the tileindex source. Then this layer is used as a tileindex for the raster layer.

I found this example from the wiki https://trac.osgeo.org/mapserver/wiki/DatabaseTileIndex
It should be clear enough to be used as a template if you don’t pay attention to Oracle raster specific details.

I recommend to publish the vector layer first into WMS and check with a WMS client that the layer really works and you can see the footprints of the images first. Make also sure that the LOCATION gets selected. With GeoPackage you should have something like this in your mapfile

CONNECTIONTYPE OGR
CONNECTION "path/to/geopackage.gpkg"
#DATA "my_layer"
or if you want more control to the layer
DATA "SELECT geometry, location FROM my_layer"

If you now read carefully LAYER — MapServer 8.0.0 documentation<https://mapserver.org/mapfile/layer.html> from the TILEINDEX keyword<https://mapserver.org/sq/optimization/tileindex.html#tileindex> again you do see the information about two alternatives filename|layername, and that a filename works only for shapefiles.

-Jukka Rahkonen-

Lähettäjä: MapServer-users <mapserver-users-bounces at lists.osgeo.org> Puolesta Marcin Niemyjski via MapServer-users
Lähetetty: keskiviikko 14. joulukuuta 2022 13.23
Vastaanottaja: Marcin Niemyjski via MapServer-users <mapserver-users at lists.osgeo.org>
Aihe: [MapServer-users] Tileindex in format different than SHP?

Hello,

Can I use format different than SHP while using tileindex of rasters?

When using Mapfile with configuration as below:

LAYER
            NAME "2021-01-02_high"
        STATUS ON
        TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg"
        TILEITEM "location"
        TYPE RASTER
        MAXSCALEDENOM 4000000
        GROUP "2021-01-02"
        PROJECTION
            "init=epsg:4326"
        END
END

error is recived:
msShapefileOpen(): Unable to access file. (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg)

is there a way to use geopackage or flatgeobuf as indexes or do I have to go back to shp?

Best,
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20221214/c3bc8e74/attachment.htm>


More information about the MapServer-users mailing list