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

◆ lwpoint_get_x()

double lwpoint_get_x ( const LWPOINT point)
extern

Definition at line 63 of file lwpoint.c.

64{
65 POINT4D pt;
66 if ( lwpoint_is_empty(point) )
67 {
68 lwerror("lwpoint_get_x called with empty geometry");
69 return 0;
70 }
71 getPoint4d_p(point->point, 0, &pt);
72 return pt.x;
73}
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
Definition lwgeom_api.c:125
int lwpoint_is_empty(const LWPOINT *point)
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
POINTARRAY * point
Definition liblwgeom.h:471
double x
Definition liblwgeom.h:414

References getPoint4d_p(), lwerror(), lwpoint_is_empty(), LWPOINT::point, and POINT4D::x.

Referenced by BOX2D_construct(), geography_centroid(), geography_centroid_from_mpoly(), lwgeom_azumith_spheroid(), lwgeom_cluster_kmeans(), lwgeom_project_spheroid(), lwline_covers_lwpoint(), RASTER_getPixelValueResample(), ST_Hexagon(), ST_Square(), and test_point_density().

Here is the call graph for this function:
Here is the caller graph for this function: