Hmmn well the formula seems to match what I turned up online for calculating the area of an irregular polygon...
The units thing makes sense and since I'm using a degree based map a result in square degrees also makes sense. What doesn't make sense to me though is that I manually converted the points in my Polygon to Spherical Mercator values which should be based on meters so I would expect the getArea result to be somewhat meaningful as a meters/km but it's still way way too high... Thanks a bunch for the input! mpriour wrote: > > Looking at the actual source code, I don't think this method works > properly on irregular polygons. It also makes the calculations in map > units. So if you are using feet you get square feet, decimal degrees you > get square degrees, etc.. > > To perform the getArea calculation it does rectangular area measurements > between the points of the line segments making up the polygon. This works > in a highly predictive manner with any regular polygon, rectangle, or > trapezoid. However, it is very unpredictable on free-form geometries. > > > cmose wrote: >> >> Hmnn after giving this a go I seem to be getting wildly inaccurate >> results, at least I believe I am. For instance, I used a polygon over an >> area I know to be roughly 400k square kilometers. Using the getArea on >> the polygon (after converting points to sphericalmercator) I'm getting a >> result of 748,912,714 sq. km... >> >> Anyone have any pointers or ideas of where I might be going wrong here? >> Thanks! >> >> > > -- View this message in context: http://www.nabble.com/Square-miles-from-Square-degrees--tp14357316p14375787.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
