0

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?

  • The answer depends on the units -- I assume you are giving latitude/longitude in degrees here? – Erica Aug 4 '14 at 13:28
  • Yes WGS84 is correct. – inspiration Aug 4 '14 at 13:28
  • The answer will also depend on what Projected Coordinate System you choose to project into. Would you be able to edit your question to specify that, please? – PolyGeo Aug 4 '14 at 13:31
1

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

then Measure Area (ArcMAP 10.2)

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.