Select to view content in your preferred language

determine area of polygon in "EPSG:3857"

2822
11
Jump to solution
05-11-2020 08:27 AM
artzaifman
Regular Contributor

I downloaded the US states shapefile from census.gov and imported "Texas" as follows:

geom = geometry.Geometry.from_shapely( us_states_.geometry[11], spatial_reference={"wkid": 3857} ) geom.area

956858520477.5554

geom = geomeUsing arcpy method "get_area" gave different answer:

geom.get_area("GEODESIC", units="SQUAREMETERS")

692662873864.4374

Main question is following:  is it possible to have "geom.area" return value  = "geom.get_area" return value?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

Absolutely, that is if you want to rely on using Geometry.area .  WKID 3857, like all conformal projections, is focused on maintaining direction and shape.  Area and distance measurements can be very off, as you are seeing with TX.  I think an old standby would be Albers Equal Area Conic USA (102003), but some of the new whole-earth projections from Esri work well like Equal Earth Americas (8858). 

View solution in original post

11 Replies
artzaifman
Regular Contributor

Reformatted errors in previous post:

I downloaded the US states shapefile from census.gov and imported "Texas" as follows:

 

geom = geometry.Geometry.from_shapely( us_states_.geometry[11], spatial_reference={"wkid": 3857} ) geom.area

956858520477.5554

Using arcpy method "get_area" gave different answer:

geom.get_area("GEODESIC", units="SQUAREMETERS")

692662873864.4374  # This is correct!

Main question is following:  is it possible to have "geom.area" return value  = "geom.get_area" return value?

 

Thank you!

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Short answer, no.  When looking at the arcgis.geometry.Geometry — arcgis 1.8.0 documentation:

propertyarea

The area of a polygon feature. None for all other feature types. The area is in the units of the spatial reference.

get_area(method, units=None)

Returns the area of the feature using a measurement type.

You are downloading the geometry data into WKID 3857, so that is the spatial reference that Geometry.area will report its value in.

artzaifman
Regular Contributor

Does it boil down to finding the best projection (with least distortion) when using "area" property as opposed to "get_area()" method in arcpy?

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Absolutely, that is if you want to rely on using Geometry.area .  WKID 3857, like all conformal projections, is focused on maintaining direction and shape.  Area and distance measurements can be very off, as you are seeing with TX.  I think an old standby would be Albers Equal Area Conic USA (102003), but some of the new whole-earth projections from Esri work well like Equal Earth Americas (8858). 

artzaifman
Regular Contributor

Great answer and thank you.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

If any of my responses answered your question, please mark one of them as the correct answer or mark the question as assumed answered to close it out.

0 Kudos
artzaifman
Regular Contributor

To close out this issue, sr=8858 works fantastically and here's the sq. meters of TX from "area" property:  

692653163631.7217 (vs. 956858520477.5554 using sr=3857).
0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I am glad you found something that worked.  In GeoNet system itself, a question is not closed out until it is marked "Assumed Answered" or one of the responses as marked as "Correct Answer".

0 Kudos
artzaifman
Regular Contributor

Thanks Joshua.  Is there additional information available that would explain how to convert from spatial reference unit area to measurement type?

0 Kudos