0

I am analysing land use across multiple region.

Each region has its own vector dataset. Each dataset contains the same columns and land use classifications (e.g. 'AC66' or 'TC01'), describing units of land (visually similar to a raster dataset).

Is it therefore possible to select all 'AC66' datapoints from multiple different layers?

The following image displays AC66 for multiple regions. I wish to select all blue data points in one dataset AND all pink datapoints in the surrounding datasets:

enter image description here

2
  • What about using Merge vector layers to only have one main layer ?
    – Kasper
    Feb 22, 2023 at 12:36
  • Welcome to GIS SE. As a new user, please take the Tour. "Is it posslible?" questions are of limited use, since the answer is pretty much always, "Yes." In this case, the answer appearser to be, "Yes, if you merge the datasets," or "Yes, if you make a view", or "Yes, if you write a script." If you Edit the Question to provide more information about the data, and what you have attempted, a more complete answer might be possible.
    – Vince
    Feb 22, 2023 at 12:42

1 Answer 1

1

You can use pyqgis. I want to select features where "kkod" field is 428

sql = '"kkod"=428' #Adjust this
for layer in QgsProject.instance().mapLayers().values(): #For all layers added to the map
    processing.run("qgis:selectbyexpression", {'INPUT':layer,'EXPRESSION':sql,'METHOD':0}) #Select by query

enter image description here

Your Answer

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

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