1

I am trying to create a map consisting of two vector layers showing a country divided into districts and contaminated areas within the country.

However, since I'm only interested in the contamination in one specific district, I have used the 'filter' as well as 'clip' tool to narrow it down.

Question: When I clip the layers, all of the contaminated areas that lie across the district boundaries get cut by the boundary line. Is it possible to include all polygons that are either in the district or lie across the boundaries?

  • I'm not clear on what you want. If you clip contam by districts, you'll get all contam inside all districts. If you only want contam inside one district, you (at least in ArcGIS) need to select that district before running clip. If QGIS doesn't operate the same way, you could export that district to a separate file to use as a boundary. Now, if you want all contam that touch your district but not clip them to that district, you'd just do a selection and export to a new dataset. – Chris W Nov 25 '14 at 1:46
  • Thanks for the answer, Chris. Basically, I just wanted to hear if it is possible to clip a layer (and remove all contaminated areas outside the district i'm interested in), but keep those polygons from the 'input vector layer' that lies on top of the boundaries of the 'clip layer'. – Mads Andreas Nov 25 '14 at 8:40
1

A clip operation should be cutting the features that cross the clip layer at the boundary - that's what clip means. Based on a tutorial in the documentation (section 9.4.20), QGIS does support selected feature input to geoprocessing, at least in this case. Make sure your districts are on top in layer order and select the target district. Then run Vector > Geoprocessing Tools > Clip. Districts is clip layer, contam is input layer. Check the Use Selected Features box for the clip layer, so it only uses the district you want. Make sure the Selected Features box for the contam layer is not checked. Give a new file name for the output, and add it to the map when prompted. This should be contam polygons within the district, including the intersecting portions of those that cross the boundary.

If you want the entire original contam polygons that are partially within your target district, not just the parts of them within (ie, no cutting), you need to do a select and export and not a clip. Select all contam that intersect your target district and save/export them to a new file.

Should neither of these methods be producing what you want, please provide screenshot(s) showing exactly what you have, the result you're getting, and try to indicate what the result you want should look like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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