
I have a polygon feature and need to determine the northernmost, southermost, easternmost, and westernmost extents in lat/long. How can I go about determining this?
I have been iterating through the coordinates of the feature and determining the max and min coordinate values. One example of values I am getting is (x_max = 9130161, x_min = 9224710, y_max = 3890385, y_min = 3747584).
If these are correct values, how can I convert them to lat/long?


Developer
Oct 20, 2011 at 6:01 AM

A faster way of finding the northernmost, southernmost, easternmost and westernmost extents is using the Envelope property of the Polygon Feature.
First, you need to find out the Projection of the polygon feature. it is the FeatureSet.Projection property where FeatureSet is the source featureSet (shapefile)
Then, you can use the Reproject.ReprojectPoints() method in DotSpatial.Projections to convert the coordinate values to lat/long.

