5

I have two vector layers as seen below, one is a landcover map showing the different habitats in a region and one is a grid of 4 x 4 km squares that covers the region.

I have to extend this grid to cover the whole landcover layer as currently it does not cover it properly, I could also create a new one but I need the current squares to stay in the same place. I can't find anything on expanding this layer or to create a new one based on the old one

grid layer

  • 1
    Hi, no this isn't a replicate. This other post was about creating a grid, my post is about expanding an existing grid, which I dont believe can be done in the same way. – Jenna Apr 18 '18 at 19:44
  • 2
    Unfortunately, the chance that a gridding tool will extend an existing vector grid is ...low. You're almost certainly going to have to recreate it. – mkennedy Apr 18 '18 at 22:54
  • 1
    Looks like your grid has some attributes with values you need to keep. If so, you should edit your question accordingly. In this case this is definitely not a duplicate question, I think. – Eva Großmann Apr 19 '18 at 7:32
  • a low chance is not a zero chance and therefore this is definitely not a duplicate question. – Jochen Schwarze Apr 19 '18 at 12:55
5

You can expand the grid, but you would have to do it manually, and that would be time consuming and prone to error.

This is how I would approach what you need.

This is going to be long winded with a bunch of pictures, bear with me.

I am starting with a grid with missing squares. The dimensions of each square are 40 by 40. Measurement units are of no importance here although I am in a cartesian system. (Projected, not Geographic coordinates.)

enter image description here

I want to overlay a new, expanded grid that exactly matches the locations of the corners of the existing grid. Vector -- Research Tools -- Vector Grid This will open up the Vector Grid tool.

enter image description here

To match the coordinates of the existing grid I am going to use the Ellipsis button ... on the far right hand side of the Grid Extent input box. I will choose the "Use layer/canvas extent" dropdown choice.

enter image description here

From there, I will choose my existing grid layer.

enter image description here

This will populate the Grid Extents (xmin,xmax,ymin,ymax) values for me.

enter image description here

I want to expand the xmax value in the Grid Extents input box by 500 units.

enter image description here

So I simply add 500 to the value.

enter image description here

I also want to expand the grid to the south. So I highlight the ymin value.

enter image description here

Then change the ymin value to what I need. In this case I am subtracting 400 units. (Divisible by the original grid square dimension of 40)

enter image description here

I also need to expand the grid to the north, so I highlight and change the ymax value.

Now I need to input my grid square dimensions. They will still be 40 by 40

enter image description here

I click on run if the other settings are good. (I am creating polygons, not lines)

Here is the end result.

enter image description here

The new grid overlays directly.

You should be able to transfer the values from the existing grid to the new grid if you so desire.

This whole process within QGIS took about three minutes

I would make a copy of your original grid so you can play with the transferring of values to the new grid. Or you can transfer the land cover habitat values directly to the new grid, from the complete land cover habitat values layer.

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.