geoprimsField-grade geospatial math

Fishnet grid of rectangular cells

A grid of rectangular cells over a polygon in its zone, laid out the way QGIS Create grid does, with each cell's center, its share inside the polygon, and the plane's scale over the area.

Experimental: not yet fully verified. How results are checked

16

16 cells on UTM zone 13N (WGS 84); the plane's scale runs -400 to -400 ppm.

Cells
RowColumnCenter latitudeCenter longitudeInside fraction
0040.0025496 deg-104.9994142 deg0.9999
1040.0016486 deg-104.9994142 deg1.0000
2040.0007476 deg-104.9994142 deg1.0000
3039.9998466 deg-104.9994142 deg0.3298
0140.0025496 deg-104.9982427 deg1.0000
1140.0016486 deg-104.9982427 deg1.0000
2140.0007476 deg-104.9982427 deg1.0000
3139.9998466 deg-104.9982427 deg0.3298
0240.0025495 deg-104.9970711 deg1.0000
1240.0016486 deg-104.9970711 deg1.0000
2240.0007476 deg-104.9970712 deg1.0000
3239.9998466 deg-104.9970712 deg0.3297
0340.0025495 deg-104.9958996 deg0.4143
1340.0016485 deg-104.9958996 deg0.4143
2340.0007475 deg-104.9958997 deg0.4144
3339.9998466 deg-104.9958997 deg0.1366
Origin
Rotation
Scale distortion
Plane
Provenance
Computed by
geometry.sampling.fishnet 1.0.0, core 0.1.0
Model
Cells of width × height in UTM plane meters from the top-left corner of the polygon's bounding box, column by column and top to bottom, rows and columns from 0, as QGIS Create grid lays out a rectangle grid; an optional clockwise rotation about that corner; each cell's inside fraction from the polygon's ear-clipped triangles clipped to it
Accuracy
Cell corners are exact on the UTM plane; on the ground a cell's size differs by the plane's scale, reported as a range
Notes
1 shown with the answer
Cites
QGIS project (vendor documentation), QGIS Processing algorithm: Create grid

Something look off?

Your values

Showing an example. Change anything.
KML, KMZ, GPX, GeoJSON, CSV, WKT, or WKB — or drop it on the box. Read on this device.
More options 2
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: Cells of width × height in UTM plane meters from the top-left corner of the polygon's bounding box, column by column and top to bottom, rows and columns from 0, as QGIS Create grid lays out a rectangle grid; an optional clockwise rotation about that corner; each cell's inside fraction from the polygon's ear-clipped triangles clipped to it

Show your work

  1. Grid

    rectangles of width by height

    from the top-left corner, E 500,000 N 4,428,090.197 m = 4 columns × 4 rows

  2. Cells

    every cell over the polygon's extent

    cell area 10,000 m² on the plane = 16

The same steps an agent gets from the MCP server with explain: true.

Accuracy: Cell corners are exact on the UTM plane; on the ground a cell's size differs by the plane's scale, reported as a range

When to use this: Use this to cut a study area into square or rectangular cells for quadrat sampling, a tally grid, or an index map, matching the grid QGIS would make in the same UTM zone. Ask for clip to keep only the cells that reach into the polygon, each with its share inside.

Limitations: Sizes are in UTM plane meters, as in QGIS; a cell on the ground differs by the scale shown. Clipped cells keep their whole outline, with the inside fraction telling how much of each lies in the polygon. At most 50,000 cells over the extent.

Worked example: 100 m cells over a field. Source: A 340 m × 333 m field in 16 cells.

You enter

Polygon
40, -105 40, -104.996 40.003, -104.996 40.003, -105
Cell width
100 m

You get

Cells
16
Origin
E 500,000 m, N 4,428,090.197 m (40.0030001°, -105°)
Rotation
0°
Scale distortion
-400 to -400 ppm
Plane
UTM zone 13N (WGS 84)

Review: Not yet independently reviewed by a GIS professional.

Last verified: 2026-10-20, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Checked against: 21 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources

Terms

UTM: Universal Transverse Mercator
A grid of 60 zones, each 6° of longitude wide, that turns latitude and longitude into eastings and northings in meters. Source: NGA.SIG.0012 UTM and UPS

Experimental means this tool has not yet met the stable bar: at least 20 golden vectors, differential tests, and an independent worked example.

UTM — Universal Transverse Mercator

A grid of 60 zones, each 6° of longitude wide, that turns latitude and longitude into eastings and northings in meters.

Source: NGA.SIG.0012 UTM and UPS