3

I am doing my thesis on worldwide river discharge data availability.

I need to know how to cut buffers with their corresponding vector/polygon that have an unique ID.

I have stations worldwide with unique IDs and metadata. I have made a selection of sub-basins that also each have their unique IDs. I have made it so that each station also shares the ID of the sub-basin they are in. I have made buffers around the stations that also contain the metadata and IDs of the station they are buffering. Now I want to clip these buffers to the sub-basins with the corresponding IDs This is because I don't want the buffer to exist in an sub-basin polygon that is uncorrelated to the original sub-basin. However, I can't figure out how to do this. When I join attributes by location it doesn't seem to do anything new. When I clip them, it just clips the buffer by all sub-basins in the area.

enter image description here

As you can see the buffers reach over their sub-basin if there is a vector basin next to it. I want to cut each buffer ONLY by their corresponding sub-basin. Doing it manually per buffer is not possible as it contains over 10 000s of stations worldwide.

enter image description here

As you can see the buffer does have different HYBAS_ID if a part of it is in a different basin. I can select these individual parts with the information click option. I now need to know how to basically cut these parts off. I don't know how to select parts of the buffers that have the SAME HYBAS_ID as the vector below (sub-basin). If i know that i can just export the selected features like Pieter suggested.

1

1 Answer 1

2

You can do this like this:

  1. calculate the intersection between both layers enter image description here
  2. on this result, use "select features by expression...", with as expression something like this: HYBAS_ID_BASIN = HYBAS_ID_BUFFER enter image description here
  3. export the selected features by rightclicking the "intersection" layer and choosing "Export"/"Save selected features as..."
6
  • What exactly do you mean by calculate the intersection between both layers? Im new to Qgis and cant find the function/tool.
    – Sebastian
    Commented Jun 12 at 12:02
  • @Sebastian: I added a screenshot where you can find it
    – Pieter
    Commented Jun 12 at 12:04
  • When i do this it selects the entire layer, instead of just selecting the overlap in which the HYBAS_ID is the same. When selecting by attribute i only see one option there (which i set to HYBAS_ID) but it seems liek it just selects everything with an HYBAS_ID. The HYBAS_ID from the buffer does seems to differ when it is situated over another basin with a different HYBAS_ID. What am i missing
    – Sebastian
    Commented Jun 12 at 12:26
  • I added some more details and an extra screenshot in the answer...
    – Pieter
    Commented Jun 12 at 19:48
  • [![As you can see the buffer does have different HYBAS_ID if a part of it is in a different basin. I can select these individual parts with the information click option. I now need to know how to basicly cut these parts off. I dont know how to select parts of the buffers that have the SAME HYBAS_ID as the vector below (sub-basin). If i know that i can just export the selected features. With a photo [1]: i.sstatic.net/f5YZMst6.png
    – Sebastian
    Commented Jun 12 at 20:27

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