I have 2 shapefiles and after identifying their intersections I'd like to know the ratio of intersecting areas, e.g.

a given shape S in file1 intersects with shapes (x1,...,xn) in file2 with ?proportions (y1,...,yn) (y_i of shape x_i lies in S).

I do not think that planar areas (e.g. shapely) are appropriate for good estimations. How (what projections) should I use to get the closest approximations to the actual area ratios? What libraries in Python or command line tools allow for calculating areas on hyperplanes (local Earth surface)?


you can use an equal area projection to get the area corresponding to the surface of the Earth. Using shapely is not a problem if you use the appropriate projection. Just make sure that you densify your shapefile vertics before you project it. Examples of equal area projections include cylindrical equal area and sinusoidal projection.

  • thanks @radouxju! what do you mean by densify? I have a shapefile I did not create (government census). How do I find out what projection it has? And in the case of it not being correct, do I unproject and project again? – Anna Magdalena Feb 5 '16 at 7:27
  • Densify: add more vertices to the edges. A straight line in lat/lon coordinates could be curved when projected, so you want to make sure the original polygon's shape is...no preserved as such but has no unwanted distortion. – mkennedy Feb 5 '16 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.