4

I have one line shapefile with lot of road sections and a point shapefile, some of these points are outside my area of interest.

The files have one attribute in common and I would like to do selection, where I select only those points that have matching attribute value with the line shapefile.

Is this possible in some meaningful way?


I believe that in this particular case I could do line buffers and use those to select the point in buffer area - but I was wondering if its possible to match the values "straight away" with each other.

1 Answer 1

4

With both layers loaded in your table of contents, go to the properties of your point layer. In the properties go to the Join tab and click the + button to add a new join, using the line layer as your target. If your line layer has a field you know is populated in all records, you can do a select from your point layer for the NOT NULL records in that field, eliminating the non-matching records.

This is an awkward work around. It would be better if QGIS had a "Keep only matching records" type join. Another, simpler work around would be to import your data into either a PostGIS or Spatialite database. Then you could do an INNER JOIN on the two tables, which would only return rows that have a match in both tables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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