QGIS – Creating Grids Following Points Coordinates

coordinatesqgisvector-grid

I am working with a set of coordinates from a csv file that creates a grid (of points) in QGIS. There is an id attribute along with the X and Y coordinates for each point.

I need to work with a polygon grid made out of these points. Using the grid tool doesn't work as there is a slight rotation to the points:

I need to create a grid that has a point in each intersection of lines and would look like the following grid I drew by hand:

I looked everywhere for a way of doing so, I found this tutorial but it didn't work for me.

Best Answer

This is a bit of a workaround in QGIS 3.8 and requires that the points are separated by a uniform distance (bit it looks like it from your screenshots).

  • Create a grid with the same spacing and dimensions as your points - somewhere in the vicinity with Processing Toolbox --> Create grid enter image description here

Next, enable the editing mode on the new Grid grid. Make sure that the Advanced Digitizing Toolbar is turned on (View --> Toolbars --> Advanced Digitizing Toolbar.

Make sure snapping is enabled: Project --> Snapping Options...

Select all elements of your grid. Select the move tool and move one edge of the grid to the corner point of your points:

enter image description here

Choose the Rotate Feature button. Zoom a lot into that corner point which now fits with the grid. While holding CTRL click on that corner point. You will see a little plus appear to show that this is the rotation point. You need to zoom a lot, since currently the click is not snapping. Now go to the other edge of the points - and with left click start the rotation of your grid there. Zoom in and make sure that you fit the grid well to the points.

enter image description here

Since the rotation does not benefit from the snapping function, you might have a few mm discrepancy, but it should probably be acceptable.

Related Question