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!
Solved! Go to Solution.
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).
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!
Short answer, no. When looking at the arcgis.geometry.Geometry — arcgis 1.8.0 documentation:
property
area
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.
Does it boil down to finding the best projection (with least distortion) when using "area" property as opposed to "get_area()" method in arcpy?
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).
Great answer and thank you.
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.
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).
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".
Thanks Joshua. Is there additional information available that would explain how to convert from spatial reference unit area to measurement type?