This project has moved. For the latest updates, please go here.

Intresting possible issue....

Topics: Data Access
Sep 27, 2013 at 3:26 PM
Hi guys, been away from this project for while, but great to see the progress you've made but...

I have a interesting issue. I have a largish shape file, consists of around 22000 road segments with a datatable of 19 columns. In an old version of sharpmap this works:
SharpMap.Layers.VectorLayer LayerM = new SharpMap.Layers.VectorLayer("PARTS_ROADS_LAYER");
            LayerM.DataSource = new SharpMap.Data.Providers.ShapeFile("C:\\temp\\ROADS_AS_ESRI_SHAPE_FILES\\Road_Link_polyline.shp", true);
            SharpMap.Data.FeatureDataSet DS = new SharpMap.Data.FeatureDataSet();

            LayerM.ExecuteIntersectionQuery(LayerM.Envelope, DS);
But In version 1 is chucks an exception saying that the array length is not big enough. Current downloading the SVN version to have a dig about but off the top of your heads can you think of a reason?
Sep 27, 2013 at 7:44 PM
If it is a large ShapeFile with a lot of features, you may get around the issue by setting
Shapefile.SpatialIndexCreationOption = SpatialIndexCreation.Linear;
prior to accessing/creating the provider

Hth FObermaier
Sep 28, 2013 at 8:06 AM
Tried that and still no luck, but i'm increasingly thinking it may be a problem with the file itself rather than sharpmap. I'll keep looking over the next couple of days,

Thanks for the suggestion.

Sep 30, 2013 at 7:14 AM
Maybe it is related to this issue?
Sep 30, 2013 at 7:52 PM
Thanks for that.

From the stack trace it certainly looks like it could be.

I'm still digging around, haven't really looked at Sharpmap in a year or so. Things have certainly changed :-)