3

I have two polygon layers: the first one contains small land lots (green in the image), the second one contains large zones (the purple line in the image attached separates 2 such zones).

I want to link (the id's of) the large zones in layer 2 to the small parcels in layer one, using the largest overlap as criteria or measure: the small parcel gets the id of the large zone with which it has the largest overlap.

How can this be done in QGIS?

enter image description here

marked as duplicate by radouxju, John Powell, user30184, Community May 28 '15 at 11:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Your problem is probably the same as here gis.stackexchange.com/questions/148526/… – user30184 May 27 '15 at 8:35
  • Thanks but no: I don't need to aggregate attributes as this OpenJump tool suggests. Anyway, I found another post, similar and with a working solution, though not so straight forward. – theej May 27 '15 at 9:35
  • @theej In light of the other solution that you have found, which you suggest may be sub-optimal, it may be worth you using the edit button to revise your question with more details of what you have tried to answer your own question. – PolyGeo May 27 '15 at 10:02
  • 2
    Sorry, I understood that the small parcel gets the id of the large zone with which it has the largest overlap meant that you wanted to add an attribute "large_zone_id" into the layer of "small_parcel" and populate that new attribute with a correct large zone id. That can be done by aggregate utility. Obviously you wanted to do something else and found a solution which is great. – user30184 May 27 '15 at 10:40
  • 1
    Actually I think @user30184's solution is a perfect fit here since this question is open to any software (and I'd upvote that answer here). If you read through the solution and look at what it actually does, despite naming conventions, I think it would solve your problem better than my solution of having to cut up and compare and join back. Sometimes tools can be used to do things they either aren't or at least don't sound like they're meant to. I'm not aware of a similar tool in either QGIS or ArcGIS (at least not without using a split/merge policy on a feature layer). – Chris W May 27 '15 at 19:53
0

This question is not the same but very related and the solution could work for me too, although it is not as straight forward as I would like it to be:

How to map a building to only one grid which contain more than half of its area using qgis?

Other suggestions are still welcome.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

0

You could use the menu Vector->Data Management Tools->Join attributes by location.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 2
    Thanks but this tool does not allow me to "Take the attributes of the feature with the largest overlap", which is what I am looking for. – theej May 27 '15 at 9:37

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