1

I'm trying to clip two layers together (a layer showing the area of a city and a layer showing a political boundary running through that city) in order to show the location of the political boundary within the city limits only. I've attempted to achieve this using both the 'clip' and 'intersect' tools, and have gotten the same result with both--the layer is listed as existing but is not visible on my map, and the attribute table for the resulting layer is empty. I have tried turning off 'on-the-fly-reprojection,' I've made sure the layers are using the same projection, and I'm definitely using the correct input and clip/intersect layers. The result is always an empty layer.

Based on reading the answers to similar questions, I think that running a spatial query might get me the result I need.

  • Clip sounds like the correct operation you're needing to use, so something must be up with the data. Would you be able to share a sample of the data, or point us to the data sources you're using? – JohnR Apr 26 '17 at 16:02
1

Sometimes Clip tool gives unexpected results, therefore, instead of Clip tool try to select the political boundary that falls within the city boundary using Select by location tool from Vector -> Research tools -> Select by location

enter image description here

  • In the Select feature in: choose the political boundary feature
  • Select the city boundary in the that intersect features in
  • If the political boundary located within selected polygon features (not as separate polygon layer), then you need to check Only selected feature located at the bottom
  • Then save the selected political boundary as new shapefile from Right-click the point layer -> Save as -> Check save only selected features

enter image description here

You need to make sure that both political boundary and city boundary shapefiles have the same CRS. Also, it is better to turn off on the fly projection and load the data into a new QGIS project to make sure that both shapefiles using the same project CRS.

1

I've just literally had the same issue here. But I then realized the issue was (at least in my case) I was not not choosing the layers in the proper order or let's say with the proper logic. Meaning that in the input layer (1st choice in the Intersect window) has to be the layer you want to select from (political boundaries in your case), while the intersect layer will be the city area boundaries. If you do it this way it should work!

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.