Closed m-mohr closed 4 days ago
At first I also thought this is easy and shapely already has the length
and area
properties, but they are unitless. Here it depends on the projection though, e.g. the area might also be given in square degrees insteasd of square meters, you need to consider holes, and sometime you even get negative areas. So we may convert to WGS84 for the area, but is that always good? It will be somewhat inaccurate compared to the native CRS (and pyproj is quite a heavy dependency).
Oh yeah, I remember hitting on some of the inaccuracies of area calculations with different projections when I was working with google buildings. Ended up with this code - you need to project to something better to calculate the area.
Just came across: https://gis.stackexchange.com/questions/337035/epsg-codes-for-projections-to-use-when-computing-the-area-of-global-polygon-sets which I appreciate and don't remember at the time.
I do think it'd be nice to give some option that's opt-in, that may have some caveats. But first key step seems to be to have the validator be good at checking this - since having the area calculated wrong may be a problem with other data.
@cholmes wrote in #38:
Validator check issue: #10