1

I have two layers, one with a fishnet grid of a country, and then the borders of the country. I would like to get a shapefile with all the features of this grid that intersect with the borders of the country. Using intersect or clip, they all cut the initial grid to the borders.

So I am getting:

clip/intersect result

But my goal is to get this:

Paint skills

1 Answer 1

2

Use Select by Expression on the grid layer to select grid features that intersect the country.

intersects( $geometry, geometry( get_feature( 'countrylayer', 'namefield', 'countryname')))

Customize the selection expression for your data as follows:

  • countrylayer -> substitute the name of the country layer
  • namefield -> substitute the name of the field that contains country names
  • countryname -> substitute the name of your country

enter image description here

Then save the selection by right clicking on the grid layer name in the layer panel > save as... > save only selected features.

enter image description here

0

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.