This project is read-only.

Unable to cast object of type 'DotSpatial.Data.Extent' to type 'DotSpatial.Data.IExtentZ'.

Aug 25, 2014 at 1:19 PM
Hello,

I am trying to evaluate dotSpatial for possible usage in our projects. I tried to load shapefile using FeatureSet.OpenFile but I am getting exception "Unable to cast object of type 'DotSpatial.Data.Extent' to type 'DotSpatial.Data.IExtentZ'"

Can you please help me find what I am doing wrong?

thank you in advance,

Karel

The relevant stacktrace is here

at DotSpatial.Data.MultiPointShapefile.FillPoints(String fileName, IProgressHandler progressHandler) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\MultiPointShapefile.cs:line 243
at DotSpatial.Data.MultiPointShapefile.Open(String fileName, IProgressHandler progressHandler) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\MultiPointShapefile.cs:line 91
at DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\Shapefile.cs:line 310
at DotSpatial.Data.Shapefile.OpenFile(String fileName) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\Shapefile.cs:line 283
at DotSpatial.Data.ShapefileDataProvider.Open(String fileName) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\ShapefileDataProvider.cs:line 119
at DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\ShapefileDataProvider.cs:line 65
at DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\DataManager.cs:line 373
at DotSpatial.Data.DataManager.OpenFile(String fileName) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\DataManager.cs:line 310
at DotSpatial.Data.FeatureSet.OpenFile(String fileName) in g:\TeamCity\buildAgent\work\356b083ef9ef62c7\DotSpatial.Data\FeatureSet.cs:line 1144
at GIS_Playground.Program.LoadShapefile(String file) in D:\work_src\GIS_Playground\GIS_Playground\Program.cs:line 45
Aug 28, 2014 at 9:03 PM
Hi Karel,

it seems there was a little error in the FillPoints-function that has been corrected in changeset 74965. Please download the latest source code to continue your evaluation without the error.

jany_
Marked as answer by jany_ on 9/9/2014 at 1:24 AM
Aug 29, 2014 at 7:26 AM
Great, thank you. I will check that out.