I've got a plot of land in Texas that is (WKT):
MULTIPOLYGON (((-98.12317899283 26.29444331481,
-98.12355263136 26.29220720658, -98.1274736313 26.29279476234,
-98.12691816383 26.29544258344, -98.12532028286 26.29498101405,
-98.12321790601 26.29467334228, -98.12317899283 26.29444331481)))'
I'd like to calculate the area in sq m. We are storing the data as 4326 in PostgreSQL. We also need to calculate values for plots in CAN and BRA, so really it's safest to go with "anywhere in the western hemisphere".
Current code is
ST_Area(ST_Transform($1, 5070)) as area_sq_m
I'm prototyping so I'm setting $1
when I run the script using ST_GeomFromText
with 4326 as the 2nd arg. This gives me 109458.48788528093 sq m.
Which SRID should I use for this calculation? What are the tradeoffs?
geography
.