[mapserver-users] GetFeatureInfo error with native vector tileindex

Even Rouault even.rouault at spatialys.com
Mon Aug 11 11:54:18 PDT 2014


Le lundi 11 août 2014 15:13:47, Rahkonen Jukka (Tike) a écrit :
> Hi,
> 
> I have something like 10000 shapefiles which I have combined to one layer
> with a tileindex shapefile which is created with ogrtindex utility. I can
> make WMS to render the layer fine both with the native Mapserver tileindex
> connection and by reading the tileindex with OGR by using CONNECTIONTYPE
> OGR.  However, GetFeatureInfo works well only with OGR connection to
> tileindex. The native tileindex throws occasionally this error (record
> number varies, naturally).
> 
> msDBFReadAttribute(): DBASE file error. Invalid record number 231855.

Is the error always the same or changing for the exact same GetFeatureInfo 
request ?
Are you able to determine which shape is at that location and find how many 
records are there in the .DBF ? (what ogrinfo should report)
That error is returned when :
if( hEntity < 0 || hEntity >= psDBF->nRecords )
So it would mean that there is an attempt of reading more records than there 
are actually. Which could happen if the DBF would be truncated. But I'm not 
clear why you wouldn't see the error through OGR.
Difficult to know without being able to reproduce...

> 
> Have anybody else experienced something similar? I know that all the
> shapefiles in the data directory are a bit faulty because they are written
> with an old shapelib version, see GDAL ticket
> http://trac.osgeo.org/gdal/ticket/5608. However, Mapserver in this case
> gives an error from msDBFReadAttribute() and I do not know if it can have
> to do with the content length field of the .shx file. Another detail is
> that the shapefiles in my data directory do not overlap but the bounding
> boxes stored into the vector tileindex file do overlap. I also tried to
> make a small sample for demonstrating the issue but unfortunately
> Mapserver works correctly with this dataset both through the native and
> OGR tileindexes.
> 
> -Jukka Rahkonen-
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the mapserver-users mailing list