Quantcast
Channel: DotSpatial Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1128

Commented Unassigned: OverflowException when adding shapefile with all features at 0,0 [24744]

$
0
0
Creating a shapefile with Dotspatial where all points are at 0, 0 (data returned from database query). When trying to add a shapefile with all points at 0, 0 Dotspatial throws an OverflowException.

This only happens when all points are at 0, 0. If they are all at the same, but a non-0,0 coordinate it works.

Exception occurs when adding the generated shapefile in custom code, or when using the "Add Layer..." button in the Dotspatial toolbar.

Dotspatial libraries from NuGet: v1.5.1
C# x86 solution in Visual Studio 2012

Exception: OverflowException

Message: Value was either too large or too small for an Int32.

Source: mscorlib

Stacktrace:
at System.Convert.ToInt32(Double value)
at DotSpatial.Controls.MapPointLayer.DrawFeatures(MapArgs e, IEnumerable`1 indices)
at DotSpatial.Controls.MapPointLayer.DrawFeatures(MapArgs args, List`1 indices, List`1 clipRectangles, Boolean useChunks)
at DotSpatial.Controls.MapPointLayer.DrawRegions(MapArgs args, List`1 regions)
at DotSpatial.Controls.MapFrame.Initialize(List`1 regions)
at DotSpatial.Controls.MapFrame.Initialize()
at DotSpatial.Controls.MapFrame.ResetBuffer()
at DotSpatial.Controls.MapFrame.set_ViewExtents(Extent value)
at DotSpatial.Controls.MapFrame.LayerColection_LayerAdded(Object sender, LayerEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at DotSpatial.Symbology.LayerEventList`1.OnLayerAdded(Object sender, LayerEventArgs e)
at DotSpatial.Symbology.LayerEventList`1.OnIncludeComplete(T item)
at DotSpatial.Serialization.BaseCollection`1.Add(T item)
at DotSpatial.Controls.MapLayerCollection.Add(IFeatureSet featureSet)
at DotSpatial.Controls.MapLayerCollection.Add(IDataSet dataSet)
at DotSpatial.Controls.MapLayerCollection.Add(String fileName)
at DotSpatial.Controls.Map.AddLayer(String fileName)
Comments: ** Comment from web user: mogikanin **

Hi, can you attach sample shape file?


Viewing all articles
Browse latest Browse all 1128

Trending Articles



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