Hi! I am a complete GIS newbie so please bear with me... I am trying to get the area of a polygon specified in lon,lat pairs in some reasonable units, like sq kilometers. My quest so far is documented here:
https://gis.stackexchange.com/questions/374428/default-geo-spatial-reference-system-in-gdal-ogr but basically I came to the conclusion that when people talk about an area of something on Earth they really mean the area of a projection (am i right about that?) and so i need to specify a projection before getting a meaningful area. So i ended up with this code: wkt = "POLYGON ((lon1 lat1, lon2 lat2, lon3 lat3))" poly = ogr.CreateGeometryFromWkt(wkt) sr = osr.SpatialReference() sr.SetWellKnownGeogCS("NAD83") sr.SetProjCS("SRS_PT_TRANSVERSE_MERCATOR") poly.AssignSpatialReference(sr) poly.GetArea() and yet I get back a value which seems to be calculated in square degrees. Thanks!
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev