How do you find the geographic size in meters given a lower left coordinate and upper right coordinate. The projection would be WGS84 projection. Ex. 33,-119,35,-117. What would be the area in meters that covers?
So, with ArcMap, from ESRI Forums:
Private Function PolygonFromEnvelope(pEnv As IEnvelope) As IPolygon Dim pPtColl As IPointCollection Set pPtColl = New Polygon With pPtColl .AddPoint pEnv.LowerLeft .AddPoint pEnv.UpperLeft .AddPoint pEnv.UpperRight .AddPoint pEnv.LowerRight 'Close the polygon .AddPoint pEnv.LowerLeft End With Set PolygonFromEnvelope = pPtColl End Function
or maybe using GDAL/OGR:
from osgeo import ogr def my_envelope(geom): (minX, maxX, minY, maxY) = geom.GetEnvelope() # Create ring ring = ogr.Geometry(ogr.wkbLinearRing) ring.AddPoint(minX, minY) ring.AddPoint(maxX, minY) ring.AddPoint(maxX, maxY) ring.AddPoint(minX, maxY) ring.AddPoint(minX, minY) # Create polygon poly_envelope = ogr.Geometry(ogr.wkbPolygon) poly_envelope.AddGeometry(ring) return poly_envelope
then calculate the polygon area (QGIS) or OGR get_area() although I'm not well-versed on GDAL/OGR so I'm not sure how it takes into account the coordinate system. QGIS should calculate with the projection in mind.