Create Grid
A layer of square or hexagonal cells of a given size covering another layer's extent.
Pitfall. Engines align the grid differently (to the extent's corner, or to multiples of the cell size), so cells and counts can differ.
| Also called | Create Fishnet, Generate Tessellation, vector grid, hexagon grid, square grid |
|---|---|
| Group | vector/geometry |
| Checks | crs.measure |
| Pitfalls | 1 listed above |
| Columbus tool | Not stated |
| Notes | Not stated |
| Status | active |
| Broader | Not stated |
| Narrower | Not stated |
| Related |
Parameters
| Name | Type | Required | Default | Values | Note |
|---|---|---|---|---|---|
cell_size | length | yes | Not stated | Not stated | Cell width, in the CRS's units (for hexagons, engines differ on which dimension). |
shape | enum | no | square | square, hexagon | Not stated |
Inputs and outputs
| Direction | Name | Type | Geometry | Note |
|---|---|---|---|---|
| Input | layer | vector | Not stated | The grid covers this layer's extent. |
| Output | output | vector | polygon | Not stated |
In each engine
| Engine | Tool | Parameters | Differences |
|---|---|---|---|
geopandas | geopandas.make_grid |
|
|
geopandas | geopandas.GeoSeries.make_grid |
|
|
grass | v.mkgrid |
| None noted |
postgis | st_hexagongrid |
|
|
postgis | st_squaregrid |
|
|
qgis | native:creategrid |
| None noted |
sf | sf::st_make_grid |
|
|
turf-js | turf.squareGrid |
|
|
whiteboxtools | CreateRectangularVectorGrid |
|
|