st_squaregrid
How PostGIS runs Create Grid: st_squaregrid.
| Engine | PostGIS |
|---|---|
| Tool name | st_squaregrid |
| Interface | sql |
| Implements | Create Grid |
| Documentation | Not stated |
| Effects | modifies input: no, network: no |
| Notes | Not stated |
| Status | active |
Parameters
| Name | Type | Required | Default | Choices | Note |
|---|---|---|---|---|---|
size | double precision | no | Not stated | Not stated | Not stated |
bounds | geometry | no | Not stated | Not stated | Not stated |
SQL overloads
-
st_squaregrid(size double precision, bounds geometry) → SETOF record
How it maps to the operation
| Operation parameter | Parameter here | Note |
|---|---|---|
layer | bounds | Not stated |
cell_size | size | Not stated |
shape | Not stated | always square. ST_HexagonGrid for hexagons. |
Differences from the operation
- The grid is aligned to multiples of the cell size from the origin, not to the bounds' corner; returns (geom, i, j) rows for every cell that intersects the bounds, including cells that only touch their edge (121 cells of 10 m for a 100 m square at the origin, in the equivalence tests).
Harvested by the postgis harvester from engine version
3.7.0. Names can change when an engine is harvested again.