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.

Can two polygon layers be merged in QGIS on the basis of a common id?

Update:

Ok , the dissolve tool works fine. But for instance lets say I have 10 polygons. 8 of them are together , so when dissolved they become one big polygon. The other two polygons are somewhere away and I dont want them to dissolve with these other 8. So how do you go about it.

share|improve this question

2 Answers 2

Yes. You're probably looking for the "Dissolve" tool.

share|improve this answer
    
Ok , the dissolve tool works fine. But for instance lets say I have 10 polygons. 8 of them are together , so when dissolved they become one big polygon. The other two polygons are somewhere away and I dont want them to dissolve with these other 8. So how do you go about it. –  Senthil Feb 15 '12 at 11:26
    
You may want to select somehow the polygons you need to merge (by hand, with a query, with the spatial query tool), then in the editing toolbar you can choose the tool "merge selected". –  Giovanni Manghi Feb 15 '12 at 12:36
1  
It sounds like you may need to reword your question if this is the case. If you want some but not all, then you wouldn't be dissolving on a common ID. Giovanni's suggestion would work for your case, or you could add an actual common ID for those you want to dissolve. –  Darren Cope Feb 15 '12 at 14:38

If you have two separate layers (shape files) you have to first merge those together for example using the "merge shape files to one" tool. Then dissolve the polygons. The dissolve tool creates multipart polygons in case of when polygons don't touch each other. You could then convert those multipolygons to single geometries with the Multipart to singleparts tool found from the Geometry tools menu.

share|improve this answer

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.