Impossible to Load a ShapeFile layer in V2.0

Sep 28, 2007 at 1:07 PM
Hi,

I've tried today the V2.0 code (loaded yesterday from svn).
Running a given example or my own example breaks with the same error in function public void ExecuteFeatureQuery(...) throws a NotImplemented exception (the only what code of this function body does).
There a call stack:
> SharpMap.dll!SharpMap.Data.Providers.ShapeFile.ShapeFileProvider.ExecuteFeatureQuery(SharpMap.Geometries.Geometry geometry = {POLYGON ((-144.449046987348 -78.3128706164065, -144.449046987348 97.5022923798688, 181.241336923785 97.5022923798688, 181.241336923785 -78.3128706164065, -144.449046987348 -78.3128706164065))}, SharpMap.Data.FeatureDataTable table = {}, SharpMap.Data.SpatialQueryType queryType = Intersects) Zeile 933 C#
SharpMap.dll!SharpMap.Layers.FeatureLayer.LoadLayerDataForRegion(SharpMap.Geometries.Geometry region = {POLYGON ((-144.449046987348 -78.3128706164065, -144.449046987348 97.5022923798688, 181.241336923785 97.5022923798688, 181.241336923785 -78.3128706164065, -144.449046987348 -78.3128706164065))}) Zeile 201 + 0x1a Bytes C#
SharpMap.dll!SharpMap.Layers.FeatureLayer.handleFeaturesRequested(object sender = {}, SharpMap.Data.FeaturesRequestedEventArgs e = {SharpMap.Data.FeaturesRequestedEventArgs}) Zeile 232 + 0x1a Bytes C#
SharpMap.dll!SharpMap.Data.FeatureDataTable.RequestFeatures(SharpMap.Geometries.Geometry missingRegion = {POLYGON ((-144.449046987348 -78.3128706164065, -144.449046987348 97.5022923798688, 181.241336923785 97.5022923798688, 181.241336923785 -78.3128706164065, -144.449046987348 -78.3128706164065))}) Zeile 780 + 0xf Bytes C#
SharpMap.dll!SharpMap.Data.FeatureDataView.onMissingRegion(SharpMap.Geometries.Geometry missingRegion = {POLYGON ((-144.449046987348 -78.3128706164065, -144.449046987348 97.5022923798688, 181.241336923785 97.5022923798688, 181.241336923785 -78.3128706164065, -144.449046987348 -78.3128706164065))}) Zeile 362 + 0x14 Bytes C#
SharpMap.dll!SharpMap.Data.FeatureDataView.GeometryFilter.set(SharpMap.Geometries.Geometry value = {POLYGON ((-144.449046987348 -78.3128706164065, -144.449046987348 97.5022923798688, 181.241336923785 97.5022923798688, 181.241336923785 -78.3128706164065, -144.449046987348 -78.3128706164065))}) Zeile 146 + 0x3c Bytes C#
SharpMap.dll!SharpMap.Data.FeatureDataView.FeatureDataView(SharpMap.Data.FeatureDataTable table = {}, SharpMap.Geometries.Geometry query = {POLYGON ((-144.449046987348 -78.3128706164065, -144.449046987348 97.5022923798688, 181.241336923785 97.5022923798688, 181.241336923785 -78.3128706164065, -144.449046987348 -78.3128706164065))}, SharpMap.Data.SpatialQueryType queryType = Intersects, string sort = "", System.Data.DataViewRowState rowState = Unchanged | Added | ModifiedCurrent) Zeile 104 + 0xa Bytes C#
SharpMap.dll!SharpMap.Data.FeatureDataView.FeatureDataView(SharpMap.Data.FeatureDataTable table = {}, SharpMap.Geometries.Geometry intersectionFilter = {POLYGON ((-144.449046987348 -78.3128706164065, -144.449046987348 97.5022923798688, 181.241336923785 97.5022923798688, 181.241336923785 -78.3128706164065, -144.449046987348 -78.3128706164065))}, string sort = "", System.Data.DataViewRowState rowState = Unchanged | Added | ModifiedCurrent) Zeile 87 + 0x14 Bytes C#
SharpMap.Presentation.WinForms.dll!SharpMap.Presentation.WinForms.MapPresenter.RenderFeatureLayer(SharpMap.Layers.IFeatureLayer layer = {rivers}) Zeile 55 + 0x51 Bytes C#
SharpMap.dll!SharpMap.Presentation.Presenters.MapPresenter2D.renderLayer(SharpMap.Layers.ILayer layer = {rivers}) Zeile 649 + 0x15 Bytes C#
SharpMap.dll!SharpMap.Presentation.Presenters.MapPresenter2D.renderAllLayers() Zeile 636 + 0xb Bytes C#
SharpMap.dll!SharpMap.Presentation.Presenters.MapPresenter2D.setViewMetricsInternal(SharpMap.Rendering.Rendering2D.Size2D newViewSize = {ViewSize2D Width: 565, Height: 305}, SharpMap.Geometries.Point newCenter = {POINT (-1.77936553955078 17.6649150848389)}, double newWorldWidth = 325.69038391113281) Zeile 936 + 0x7 Bytes C#
SharpMap.dll!SharpMap.Presentation.Presenters.MapPresenter2D.setViewEnvelopeInternal(SharpMap.Geometries.BoundingBox newEnvelope = {BoundingBox Lower Left: (-164,62, -36,90) Upper Right: (161,07, 72,23)}) Zeile 876 + 0x62 Bytes C#
SharpMap.dll!SharpMap.Presentation.Presenters.MapPresenter2D.ZoomToWorldBoundsInternal(SharpMap.Geometries.BoundingBox zoomBox = {BoundingBox Lower Left: (-164,62, -36,90) Upper Right: (161,07, 72,23)}) Zeile 517 + 0x42 Bytes C#
SharpMap.dll!SharpMap.Presentation.Presenters.MapPresenter2D.ZoomToExtentsInternal() Zeile 469 + 0x59 Bytes C#
SharpMap.dll!SharpMap.Presentation.Presenters.MapPresenter2D.view_ZoomToExtentsRequested(object sender = {SharpMap.Presentation.WinForms.MapViewControl}, System.EventArgs e = {System.EventArgs}) Zeile 771 + 0x7 Bytes C#
SharpMap.Presentation.WinForms.dll!SharpMap.Presentation.WinForms.MapViewControl.onRequestZoomToExtents() Zeile 634 + 0x12 Bytes C#
SharpMap.Presentation.WinForms.dll!SharpMap.Presentation.WinForms.MapViewControl.ZoomToExtents() Zeile 328 + 0x7 Bytes C#
DemoWinForm.exe!DemoWinForm.MainForm.zoomToExtents() Zeile 294 + 0xe Bytes C#
DemoWinForm.exe!DemoWinForm.MainForm.ZoomToExtentsToolStripButton_Click.AnonymousMethod() Zeile 193 + 0x8 Bytes C#
Externer Code
DemoWinForm.exe!DemoWinForm.Program.Main() Zeile 33 + 0x1a Bytes C#
Externer Code

It's now possible to use the SharpMap engine V2.0 or it can be take a bit longer?

Thanks!
Coordinator
Sep 28, 2007 at 4:50 PM
Hi Alex -

It's true that the ShapeFile provider is broken for display at this time (though it works fairly well for data transfer). I'll make it a work item and hope to fix it soon. As I'm doing all my development against a custom database provider at this time, I missed it.

Thanks for the report.
Coordinator
Sep 28, 2007 at 4:51 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Oct 1, 2007 at 8:32 AM
Hi,

are some progress done with this issue?

Thanks.
Oct 2, 2007 at 4:44 AM
As far as I understand , in the last revision, you can load and display shp files if they have a file based geoindex.