PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ LWGEOM_y_point()

Datum LWGEOM_y_point ( PG_FUNCTION_ARGS  )

Definition at line 759 of file lwgeom_ogc.c.

760{
761 GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
762 POINT4D pt;
763
764 if (gserialized_get_type(geom) != POINTTYPE)
765 lwpgerror("Argument to ST_Y() must have type POINT");
766
768 {
769 PG_RETURN_NULL();
770 }
771 PG_RETURN_FLOAT8(pt.y);
772}
int gserialized_peek_first_point(const GSERIALIZED *g, POINT4D *out_point)
Pull the first point values of a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
#define LW_FAILURE
Definition liblwgeom.h:96
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition liblwgeom.h:102
double y
Definition liblwgeom.h:414

References gserialized_get_type(), gserialized_peek_first_point(), LW_FAILURE, POINTTYPE, and POINT4D::y.

Here is the call graph for this function: