Note that there are some explanatory texts on larger screens.

plurals
  1. POCalculating area from lat/lon polygons in Python
    primarykey
    data
    text
    <p>Basically, I want to know how many times a 0.25°lat x 0.25°lon patch is fitting in various polygons located around the world. The latter have sizes around 3°lat x 10°lon or 2°lat x 4°lon.</p> <p>I have the lat/lon values of the corners of the polygons and I am calculating their area like this:</p> <pre><code>from pyproj import Proj from shapely.geometry import shape def getArea(coords): c = {"type": "Polygon", "coordinates": [[ (coords[0], coords[2]), (coords[1], coords[2]), (coords[0], coords[3]), (coords[1], coords[3]) ]]} lon, lat = zip(*c['coordinates'][0]) pro = Proj("+proj=aea") x, y = pro(lon, lat) poly = {"type": "Polygon", "coordinates": [zip(x, y)]} return shape(cop).area </code></pre> <p>I took the approach from here: <a href="https://stackoverflow.com/questions/4681737/how-to-calculate-the-area-of-a-polygon-on-the-earths-surface-using-python">How to calculate the area of a polygon on the earth&#39;s surface using python?</a></p> <p>Now the question is, which equal area projection shall I choose in order to have comparable area sizes for the polygons. The area of the small patch is always the same, regardless of where it is located on the globe in such a projection.</p> <p>Taking the Albers Equal Area Projection (aea) results in these areas of three polygons:</p> <ol> <li>240993868.90978813</li> <li>699931593.1047173</li> <li>212092562.5238676</li> </ol> <p>Taking the Lambert Azimuthal Equal Area Projection (laea) results in these areas of the same polygons:</p> <ol> <li>148709452.69292444</li> <li>409253749.5468254</li> <li>106218747.36092758</li> </ol> <p>Why is the relation between the areas in the two projections different? First 1:3 = 0.344; Second 1:3 = 0.363; They should be the same since both are equal area projections?!</p> <p>That makes me wonder whether it is legitimate to compare the small patch to the areas of the polygons in either projection. Do you have any advice?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload