ThinkGeo.com    |     Documentation    |     Premium Support

Exception whn using Shapefile with "RequireIndex=false;

Hi,

i have a shapefile which lies on a write-protected directory. So i set layer.RequireIndex=false; in the layer-initialization.

When i now do a

layer.QueryTools.GetFeaturesWithinDistanceOf( clickPoint, GeographyUnit.Meter, DistanceUnit.Meter, 100, new string[ 0 ] { } );

I get an ArrayOutOfBound-Exception, here’s the errorstack

bei ThinkGeo.MapSuite.Layers.ShapeFileIndex.PTg=(Int32 recordIndex)
bei ThinkGeo.MapSuite.Layers.ShapeFile.5Dc=(Int32 recordIndex)
bei ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.GetAllFeaturesCore(IEnumerable1 returningColumnNames) bei ThinkGeo.MapSuite.Layers.FeatureSource.GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable1 returningColumnNames)
bei ThinkGeo.MapSuite.Layers.ShapeFileFeatureSource.GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable1 returningColumnNames) bei ThinkGeo.MapSuite.Layers.FeatureSource.GetFeaturesWithinDistanceOfCore(BaseShape targetShape, GeographyUnit unitOfData, DistanceUnit distanceUnit, Double distance, IEnumerable1 returningColumnNames)
bei ThinkGeo.MapSuite.Layers.FeatureSource.GetFeaturesWithinDistanceOf(BaseShape targetShape, GeographyUnit unitOfData, DistanceUnit distanceUnit, Double distance, IEnumerable1 returningColumnNames) bei ThinkGeo.MapSuite.Layers.QueryTools.GetFeaturesWithinDistanceOf(BaseShape targetShape, GeographyUnit unitOfData, DistanceUnit distanceUnit, Double distance, IEnumerable1 returningColumnNames)

if i do the same Thing from a writable Location (c:\temp) there is no error.

Please help.

Regards,
Andreas

Hi Andreas,

That’s maybe related with data.

Could you please sent us a simple sample with data which can reproduce this problem? So our developer can reproduce and see how to solve it.

Regards,

Don