I have a number of polylines in QGIS that correspond to seismic SEGY files, and want to subset the dataset using a box/polygon that I make in QGIS. Is it possible to get the feature names that are within the extent of the polygon?

Here is a picture of what I mean:

enter image description here

I would like to get a list or attribute of the linenames of all the features contained within the extent of that box.


Depending on what you want to do you have to choose the appropriate spatial query for it.

You select your polygon, if you have more than one and take care that the edit mode is turned off as your geo-objects need to be in the original file and not in the temporal file in the background used for editing.

Then you choose from Vector the tool "Spatial Query" (eventually it needs to be activated in the extensions options).

In the first input you put your lines, reference features are your polygon. In the middle you choose either within or intersect.

The outcome is a selection that can be safed as a new table or geometry. Go to your line-layer and right-click and choose "save as". There you take care to only export the selected features and choose your type of file. If you save it as a csv or dbf you can open it in any spreadsheet program like Excel or LibreOffice and you have your list, as the fields containing your linenames will be a column there.


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.