79 POSTGIS_DEBUG(2,
"geometry_to_point called");
81 if ( PG_ARGISNULL(0) )
84 geom = PG_GETARG_GSERIALIZED_P(0);
87 elog(ERROR,
"geometry_to_point only accepts Points");
101 PG_FREE_IF_COPY(geom,0);
103 PG_RETURN_POINT_P(point);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
void lwpoint_free(LWPOINT *pt)
double lwpoint_get_x(const LWPOINT *point)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
double lwpoint_get_y(const LWPOINT *point)