Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a polygon layer that contains some polygons inside of polygons. I need to be able to identify the polygons inside of polygons and discard the polygons inside of the polygons. What is the most efficient way of doing that?

share|improve this question
1  
what's the point of the union if the polygons are contained within the bigger ones? Are there holes? Otherwise the inner ones could be simply deleted, right? –  underdark Mar 15 '13 at 17:55
    
Good point, removing that... –  CLJ Mar 15 '13 at 19:56
add comment

1 Answer

up vote 2 down vote accepted

If the polygons need to be completely within larger polygons you can use ST_Contains, if they simply need to be touching at some point you can use ST_Intersects.

If they're completely within your union is just going to return the outer boundary of the larger polygon. Do you need to doughnut out the smaller polygons from the larger ones?

share|improve this answer
    
I see what you are saying, I don't actually need to union them, just need to take the boundary of the containing polygon and discard the polygons inside it. –  CLJ Mar 15 '13 at 18:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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