geos.GEOSHilbertCode ⇒ number ⏏
Calculate the Hilbert code of the centroid of a geometry relative to an extent. This allows sorting geometries in a deterministic way, such that similar Hilbert codes are likely to be near each other in two-dimensional space. The caller must ensure that the geometry is contained within the extent.
Kind: global property of geos
Returns: number - 1 on success, 0 on exception.
| Param | Type | Description |
|---|---|---|
| geom | GEOSGeometry | Input geometry, must be non-empty |
| extent | GEOSGeometry | Extent within which to calculate the Hilbert code for geom |
| level | number | The level of precision of the Hilbert curve, up to 16 |
| code | NumberPointer | Pointer to be filled in with Hilbert code result |
geos.GEOSHilbertCode_r ⇒ number ⏏
Calculate the Hilbert code of the centroid of a geometry relative to an extent. This allows sorting geometries in a deterministic way, such that similar Hilbert codes are likely to be near each other in two-dimensional space. The caller must ensure that the geometry is contained within the extent.
Kind: global property of geos
Returns: number - 1 on success, 0 on exception.
| Param | Type | Description |
|---|---|---|
| handle | GEOSContextHandle_t | - |
| geom | GEOSGeometry | Input geometry, must be non-empty |
| extent | GEOSGeometry | Extent within which to calculate the Hilbert code for geom |
| level | number | The level of precision of the Hilbert curve, up to 16 |
| code | NumberPointer | Pointer to be filled in with Hilbert code result |