Ah good deal, thanks for the clarification. I wonder if there are some set conversions that can be applied to various regions of the globe to get area from square degrees with +-5% or so of accuracy? It would be nice to be able to define 4 quadrants of the globe or something like that, and apply a constant conversion rate to items that fall into those four segments...
If anyone has any info please chime in! Thanks again mpriour wrote: > > It just occured to me as re-read that you are projecting to Spherical > Mercator, > The spherical mercator projection doesn't preserve area. It makes the > intersection of all lat/lon lines into 90 degree intersections. While this > is not terrible at the equator, the higher latitude you get the worse than > warping effect is going to be. > You could do some calculations & figure out the miles per unit degree > latitude & longitude (they will be different) in your area of interest. > You can also look up that information, though I can't remember where. I > used a look up for numerous conversions of square degrees to acres in > central Texas and it was only off by 1-2%, which was good enough for our > calculations. > > > cmose wrote: >> >> 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--tp14357316p14375841.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
