I have 2 shapes - one representing line features of pipes, another of roads. I would like to create a separate shapefile consisting only of the pipes that lie within 20m of the roads. Only the segments of the pipe that lie within the 20m buffer should be returned. This means that some features have to be split.

I have tried adding a buffer of 20m to the road and then running an intersect query with the pipes. The problem of using this approach is that the output presents a full feature (pipe) if a part of it touches the buffer - I need to isolate only the parts of the pipes that are within the 20m buffer.

  • 1
    The buffer is a polygon layer, try cliping the pipes layer with the buffer layer – Gerardo Jimenez Jan 5 '15 at 16:06
  • Thank you for the responses. Joseph, I retested it using the Intersect as you suggested and it seems to work fine now. I suspect that I used the Vector>Spatial Query function. Gratitude – Rudolf Jan 6 '15 at 13:03
  • Most welcome Rudolf, I will post the comment as an answer for the convenience of others. Also thanks to @GerardoJimenez in providing a very useful tip which people can easily forget. – Joseph Jan 6 '15 at 15:28

As you have already mentioned in your comment Rudolf, you may have performed a Query which only filters out features, it does not perform any analytics. The Intersect will 'cut' out features which intersect one another and outputs the results in a new layer. The Intersect function can be found in:

Vector > Geoprocessing Tools > Intersect

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.