2.2.24. Meter grid

Pic. 2.14. A combination of generated grids
The tool generates a grid within the boundaries of features of a vector layer or a bounding box. The grid size is set in meters. Features can be anywhere in the world.
Inputs:
Cell size in meters;
Mode:
points
orrect
(squares);Algorithm for cropping the grid along the feature borders:
all
(leave all the squares in extent),touches
(leave all the squares touching features),intersection
(crop the squares along the borders of the features);GeoPackage file with polygons or multipolygons. Calculation time depends on the number of nodes in the boundary layer;
Extent. Instead of uploading a layer, you can set a bounding box. Draw a custom rectangle on the map below. The Extent field will be filled with the numeric value that you can adjust manually;
Vertical orienting or with fine size. By default,
simple
mode is used, the grid looks vertical in WGS 84 (EPSG:3857) projection, but angles and distances may be distorted. Enterfine
to get a grid with more precizely matching angles and distances, however it will look tilted in EPSG:3857.
Output:
GeoPackage containing the grid. Each cell/point of the grid has the following attributes: number (cells are numbered vertically, top to bottom, left to right, starting with the first left column even if it doesn’t reach the top), row_index and col_index. To display the numbers, enable lables in the layer style settings and select the desired attribute.

Pic. 2.15. Cell numbers displayed
Resulting grids with different settings:

Pic. 2.16. Squares - all

Pic. 2.17. Squares - touches

Pic. 2.18. Squares - intersection

Pic. 2.19. Points - all

Pic. 2.20. Points - intersection
Launch tool: https://toolbox.nextgis.com/t/grid
Try it out using our sample:
Download input dataset to test the instrument. Step-by-step instructions included.
Get the output to additionally check the results.