2

Closed

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

description

After Opening a dspx file I created, the map is empty.
Then after I zoom to extents the following error appears:
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at DotSpatial.Symbology.ProjExt.ProjToPixel(IProj self, Coordinate location)
at DotSpatial.Symbology.ProjExt.ProjToPixel(IProj self, Extent env)
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.Map.ZoomToMaxExtent()
...

file attachments

Closed May 10, 2012 at 8:47 PM by mudnug
Multipoint layer is not supported by LabelSymbolizer. You can convert your layer to a point layer, or open a new feature request.

comments

mudnug wrote Apr 9, 2012 at 7:31 PM

Can you zip up the project and attach it to this issue?

mafe wrote May 4, 2012 at 10:22 AM

Got the same error :(
It seams to me that the values for extents (X,Y,max X etc.) are lost?
So when Zooming to extents DotSpatial tries to convert a Value for infinity or n/a into Int32
I attached a shp-file and my project-file.
Hope you can figure it out.

mudnug wrote May 4, 2012 at 11:31 PM

We spent some time looking at this. It seems you have a projection issue. Have you verified the projection is correct? Try deleting the .prj file and note the results.

mafe wrote May 8, 2012 at 7:07 AM

Thank you very much for your help!!
It was really an issue in the projection file.
Ive replaced it with a new *.prj file from spatialreference.org which I thaught would match best.
The Exception doesn
t appear anymore. :)
But Im not able to add labels to the layer. :(
I
m able to setup everything in the feature labeler but nothing happens after clicking on "apply".
Maybe still something wrong with the projection?

mafe wrote May 8, 2012 at 7:31 AM

Here is the new prj-file I`m using

mudnug wrote May 8, 2012 at 9:12 PM

Are you familiar with labeling, or is this a general question? Label operations: http://www.codeplex.com/download?ProjectName=dotspatial&DownloadId=226074

mafe wrote May 9, 2012 at 8:11 AM

Yes Im familiar with labeling. Its just not working with this particular shp-file.
I'm guessing that this is also the result of a wrong projection. Would that be possible?