How do I select polygons that overlap by a specified percentage of overlap?

المشرف العام

Administrator
طاقم الإدارة
I have two polygon layers. One represents parcels, the other is a hazard zone. How do I return only parcels where more than 30% of the parcel area overlaps the hazard zone? For example a parcel with an area of 100,000 square feet with 35,000 square feet inside the hazard zone should be returned as it's 35% overlap. On the other hand, a parcel of 100,000 square feet with 5,000 square feet inside (overlapping) the hazard area should not be returned as it's only 5% overlap.

I tried st_intersects but, although I get the parcels that overlap the hazard are, I need to take into account the percentage of overlap. How do I compare areas of overlap versus parcel area?

select p.id from parcels p, hazard h where st_intersects(p.geom, h.geom)

أكثر...
 
أعلى