Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt

Use this file to discover all available pages before exploring further.

Return a list of geometries divided based of given extent limit. ST_ExtentBasedSubDivide

Signatures

ST_ExtentBasedSubDivide(geom: Geometry, maxWidth: Double, maxHeight: Double)

Parameters

geom
Geometry
required
The input geometry.
maxWidth
Double
required
The max width value.
maxHeight
Double
required
The max height value.

Example

SELECT ST_ExtentBasedSubDivide(ST_GeomFromText("POLYGON((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))"), 10, 10)
[
  POLYGON ((10 10, 10 18.75, 18.75 18.75, 18.75 10, 10 10)),
  POLYGON ((18.75 10, 18.75 18.75, 27.5 18.75, 27.5 10, 18.75 10)),
  POLYGON ((10 18.75, 10 27.5, 18.75 27.5, 18.75 18.75, 10 18.75)),
  POLYGON ((18.75 18.75, 18.75 27.5, 27.5 27.5, 27.5 18.75, 18.75 18.75)),
  POLYGON ((27.5 10, 27.5 18.75, 36.25 18.75, 36.25 10, 27.5 10)),
  POLYGON ((36.25 10, 36.25 18.75, 45 18.75, 45 10, 36.25 10)),
  POLYGON ((27.5 18.75, 27.5 27.5, 36.25 27.5, 36.25 18.75, 27.5 18.75)),
  POLYGON ((36.25 18.75, 36.25 27.5, 45 27.5, 45 18.75, 36.25 18.75)),
  POLYGON ((10 27.5, 10 36.25, 18.75 36.25, 18.75 27.5, 10 27.5)),
  POLYGON ((18.75 27.5, 18.75 36.25, 27.5 36.25, 27.5 27.5, 18.75 27.5)),
  POLYGON ((10 36.25, 10 45, 18.75 45, 18.75 36.25, 10 36.25)),
  POLYGON ((18.75 36.25, 18.75 45, 27.5 45, 27.5 36.25, 18.75 36.25)),
  POLYGON ((27.5 27.5, 27.5 36.25, 36.25 36.25, 36.25 27.5, 27.5 27.5)),
  POLYGON ((36.25 27.5, 36.25 36.25, 45 36.25, 45 27.5, 36.25 27.5)),
  POLYGON ((27.5 36.25, 27.5 45, 36.25 45, 36.25 36.25, 27.5 36.25)),
  POLYGON ((36.25 36.25, 36.25 45, 45 45, 45 36.25, 36.25 36.25))
]