Incorrect Bounding Box for ShapeFile

Topics: SharpMap v0.9 / v1.x, WinForms Controls
Feb 19, 2009 at 2:26 PM
I have a single shapefile of the country of Cambodia that has >1600 polygon objects within it.  Within ArcView, the bounding box indicates that the min/max of everthing falls within the expected lat/long range and the shapes all render properly.  However, when I load it up in SharpMap, do a ZoomExtents, SharpMap shows the minimums as 0 so that Cambodia renders as a small object on the far right of the display instead of in the center.

I noticed that when I step out of the function GetAllFeatureBoundingBoxes(), a few of the boxes returned have xMin, xMax, yMin, yMax all returning as NaN.  Although it doesn't appear to be the problem, any ideas of why the bounds are not being correctly identified?  Other than the bounds issue, the shapefile renders properly.

Thanks,

Dirk
Coordinator
Feb 23, 2009 at 10:24 AM
Edited Feb 23, 2009 at 10:24 AM
UPDATE: recieved from dirkkaiser:

I figured out what the problem is...my shapefiles had some extra garbage in them which is strange as I just merged them together in ArcView using their tools.  However, even though it displayed fine in ArcView, if I ran the Check Geometry and Repair Geometry, it cleaned them up fine.  It now displays properly in SharpMap.