352 double size = PG_GETARG_FLOAT8(0);
354 int cell_i = PG_GETARG_INT32(1);
355 int cell_j = PG_GETARG_INT32(2);
362 elog(ERROR,
"%s: origin point is empty", __func__);
369 elog(ERROR,
"%s: origin argument is not a point", __func__);
374 size, cell_i, cell_j,
377 ghex = geometry_serialize(lwhex);
378 PG_FREE_IF_COPY(gorigin, 3);
379 PG_RETURN_POINTER(ghex);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int32_t lwgeom_get_srid(const LWGEOM *geom)
Return SRID number.
double lwpoint_get_x(const LWPOINT *point)
double lwpoint_get_y(const LWPOINT *point)
static LWGEOM * hexagon(double origin_x, double origin_y, double size, int cell_i, int cell_j, int32_t srid)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)