# Meter grid

![image](docs_toolbox/source/_static/grids_multi.png)

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:

* Step. Grid cell size in meters;
* Mode. Squares or points. Default: points;
* Clip. How to clip the grid: 1) By feature boundaries, 2) Keeping all grid cells that intersect boundaries, 3) Keeping all grid cells in the extent;
* Boundary polygon vector file in Geopackage format. Multipolygons are supported. Calculation time depends on the number of nodes in the boundary layer;
* Extent. Set the extent on the map or upload as file;
* Grid alignment. Mode of clipping edges of grid. 1) Vertical - the grid looks vertical in WGS 84 (EPSG:3857) projection, but angles and distances may be distorted.; 2) Precise - 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.

![image](docs_toolbox/source/_static/grid_numbers.png)

Resulting grids with different settings:

![image](docs_toolbox/source/_static/grid_rect_all.png)![image](docs_toolbox/source/_static/grid_rect_touches.png)![image](docs_toolbox/source/_static/grid_rect_intersection.png)![image](docs_toolbox/source/_static/grid_point_all.png)![image](docs_toolbox/source/_static/grid_point_intersection.png)

Launch the tool: [https://toolbox.nextgis.com/t/grid](https://toolbox.nextgis.com/t/grid)

**Try the tool in action**

1. Click on the **Demo** button above the tool form. The fields are filled in with demo values.
2. Click on the **Run** button.
