Return the QUADBIN cell at the given resolution that contains a point geometry. The geometry must be a POINT; longitudes are interpreted in SRID 4326.
geoToQuadbinCell(geometry,integer) → quadbin
SELECT geoToQuadbinCell(geometry 'SRID=4326;POINT(4.35 50.85)', 10) = quadbin '48a6227affffffff'; -- true
Return the centroid of a cell as an SRID-4326 point. The static form takes a single quadbin; the temporal form returns the centroid of each cell in a trajectory as a tgeompoint.
quadbinCellToPoint(quadbin) → geometry
tquadbinCellToPoint(tquadbin) → tgeompoint
SELECT ST_AsText(quadbinCellToPoint(quadbin '48427fffffffffff'));
-- POINT(-101.25 48.92249926375824)
SELECT asText(tquadbinCellToPoint(tquadbin
'{480fffffffffffff@2001-01-01, 48427fffffffffff@2001-01-02}'));
-- {POINT(0 0)@2001-01-01,
-- POINT(-101.25 48.92249926375824)@2001-01-02}
Return the square polygon boundary of a cell as an SRID-4326 geometry. The static form takes a single quadbin; the temporal form returns the boundary of each cell in a trajectory as a tgeometry.
quadbinCellToBoundary(quadbin) → geometry
tquadbinCellToBoundary(tquadbin) → tgeometry
SELECT ST_AsText(quadbinCellToBoundary(quadbin '480fffffffffffff')); -- POLYGON((-180 -85.0511287798066,180 -85.0511287798066, -- 180 85.0511287798066,-180 85.0511287798066, -- -180 -85.0511287798066))