Hi all,

MY MAPFILE: https://pastebin.com/6A98L6V7
I am running into an issue with WMS GetFeatureInfo when using FlatGeobuf (FGB) 
as a TILEINDEX source in MapServer. The problem appears to be related to how 
MapServer / OGR handles multiple records inside a FlatGeobuf tile index.

Environment:
- MapServer: 8.6.0-beta2
- GDAL: 3.12.0
- PROJ: 9.7.0
- OS: Debian Bookworm (Docker)

TileIndex structure:
I am using FlatGeobuf as a tile index, with a schema similar to a classic 
shapefile tile index.
The TILEITEM column is called "location" and contains both the file path and 
the layer name,
separated by a comma:

location
data/CLMS_UA_LCU_S2021_V025ha_BA001L1_SARAJEVO_03035_V01_R01_20250523.fgb,CLMS_UA_LCU_S2021_V025ha_BA001L1_SARAJEVO_03035_V01_R01_20250523
data/CLMS_UA_LCU_S2021_V025ha_AT001L3_WIEN_03035_V01_R01_20250418.fgb,CLMS_UA_LCU_S2021_V025ha_AT001L3_WIEN_03035_V01_R01_20250418

Each referenced FlatGeobuf file contains exactly one vector layer, and the 
layer name matches
the name provided after the comma in the tile index.

Problem description:
- I have vector layers configured in MapServer using CONNECTIONTYPE OGR with 
TILEINDEX pointing to an FGB file.
- The layers are only visible at large scales (MAXSCALEDENOM 300000), where 
vector data is queried.
- When issuing a WMS GetFeatureInfo request at an appropriate zoom level:
  - GetFeatureInfo works correctly for features coming from the FIRST record in 
the tile index.
  - Features coming from any subsequent tile index record never return 
GetFeatureInfo results.
- The request itself is valid (correct bbox, x/y, tolerance, scale), and 
rendering works correctly
  for all tiles — only GetFeatureInfo is affected.

Additional observations:
- Reordering records inside the FlatGeobuf tile index changes which dataset 
GetFeatureInfo works for.
  Whichever record is first starts working; the others stop working.
- If I bypass the tile index and connect directly to a single FlatGeobuf file 
using:
  CONNECTION "path/to/file.fgb"
  DATA "layer_name"
  then GetFeatureInfo works as expected.
- To further isolate the issue, I created a separate MapServer layer only for 
the Vienna dataset
  (the dataset affected by the problem), with an explicit CONNECTION and DATA 
pointing directly
  to the FlatGeobuf file and its internal layer name (no TILEINDEX involved).
- In this setup, with the layer name explicitly defined, GetFeatureInfo works 
correctly and
  consistently for Vienna features.
- This strongly suggests that the problem is not related to the data itself, 
styles, templates,
  or scale settings, but specifically to the use of FlatGeobuf as a TILEINDEX 
source during
  GetFeatureInfo processing.
- It appears that during GetFeatureInfo MapServer / OGR only evaluates the 
first tile index
  record and does not properly iterate over or reset OGR datasets for 
subsequent records,
  especially when different internal layer names are involved.

My suspicion is that this may be a limitation or bug in how FlatGeobuf is 
handled as a TILEINDEX
source, particularly for GetFeatureInfo requests.

Has anyone encountered similar behaviour when using FlatGeobuf tile indexes 
with GetFeatureInfo,
or can confirm whether this is a known limitation in MapServer or GDAL/OGR?

Thanks,
Marcin
_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to