Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

Created Unassigned: Reading shapefile with null values throws exception [24969]

$
0
0
Hi,

I have a shapefile with some columns having null values. When I attempt to get the feature set from it, it throws the following exception:

Value cannot be null.
Parameter name: src
at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at DotSpatial.Data.BufferedBinaryReader.Read(Byte[] buffer, Int32 index, Int32 count)
at DotSpatial.Data.PointShapefile.FillPoints(String fileName, IProgressHandler progressHandler)
at DotSpatial.Data.PointShapefile.Open(String fileName, IProgressHandler progressHandler)
at DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler)
at DotSpatial.Data.Shapefile.OpenFile(String fileName)
at DotSpatial.Data.ShapefileDataProvider.Open(String fileName)
at DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName)
at DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler)
at DotSpatial.Data.DataManager.OpenVector(String fileName, Boolean inRam, IProgressHandler prog)
at DotSpatial.Data.FeatureSet.Open(String fileName)
at XS.DataConduit.Domain.Helpers.FileParserHelper.ExtractAttributeFromShapefile(DataImport dataImport) in C:\Projects\AgVeritas\XS.AGVeritas\XS.DataConduit.Domain\Helpers\FileParserHelper.cs:line 78
at XS.DataConduit.Domain.Handlers.DataImportHandler.ParseFile(Int32 dataImportKey) in C:\Projects\AgVeritas\XS.AGVeritas\XS.DataConduit.Domain\Handlers\DataImportHandler.cs:line 70
at XS.DataConduit.Service.Controllers.DataImportController.ParseFile(Int32 id) in C:\Projects\AgVeritas\XS.AGVeritas\XS.DataConduit.Service\Controllers\DataImportController.cs:line 269
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)

Viewing all articles
Browse latest Browse all 3973

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>