[MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR
Peter Schmitt
pschmitt at gmail.com
Wed Dec 7 09:07:50 PST 2022
On Wed, Dec 7, 2022 at 1:16 AM Schylberg Lars <lars.schylberg at saabgroup.com>
wrote:
> 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.
Thanks for the message, Lars! This gave me another idea to debug.
When I set DEBUG 5 and request
mapserv -nh
QUERY_STRING='service=WFS&VERSION=1.0.0&REQUEST=getfeature&map=/app/mapfiles/test2.map&typename=vector_via_ogr&OUTPUTFORMAT=geojson'
then the log contains
OGROPen(tindex_ogr)
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer
`vector_via_ogr'. File not found or unsupported format. Check server logs.
Open failed for OGR connection in layer `vector_via_ogr'.
with the layers
LAYER
DEBUG 5
NAME "tindex_ogr"
TYPE POLYGON
CONNECTIONTYPE OGR
CONNECTION "/app/mapfiles/tindex.geojson"
STATUS OFF
END
LAYER
DEBUG 5
NAME "vector_via_ogr"
TYPE POLYGON
TILEINDEX tindex_ogr
CONNECTIONTYPE OGR
STATUS OFF
END
This log line
OGROPen(tindex_ogr)
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".
https://github.com/MapServer/MapServer/blob/71ecf4028b0769027df3a970a36d56feb1d46ab6/mapogr.cpp#L1205-L1238
In other words, I expect the log line to read
OGROPen(/app/mapfiles/tindex.geojson)
and not
OGROPen(tindex_ogr)
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
LAYER
DEBUG 5
NAME "bogus_raster"
TYPE RASTER
TILEINDEX tindex_ogr
STATUS OFF
PROJECTION
"init=epsg:3857"
END
END
and then issue a bogus request like
curl '
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
'
Then the log line includes
msOGRFileOpen(/app/mapfiles/tindex.geojson)...
OGROPen(/app/mapfiles/tindex.geojson)
msConnPoolRegister(tindex_ogr,/app/mapfiles/tindex.geojson,0x556aba222630)
and _not_
msOGRFileOpen(tindex_ogr)...
like I see for a vector tile index of vectors.
Thanks, Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20221207/a4c93f95/attachment.htm>
More information about the MapServer-users
mailing list