29 #include "../postgis_config.h" 68 lwerror(
"lwpoint_get_x called with empty geometry");
81 lwerror(
"lwpoint_get_y called with empty geometry");
94 lwerror(
"lwpoint_get_z called with empty geometry");
99 lwerror(
"lwpoint_get_z called without z dimension");
112 lwerror(
"lwpoint_get_m called with empty geometry");
117 lwerror(
"lwpoint_get_m called without m dimension");
142 result->
flags = flags;
144 result->
point = point;
243 LWDEBUG(2,
"lwpoint_clone called");
245 memcpy(ret, g,
sizeof(
LWPOINT));
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
double lwpoint_get_y(const LWPOINT *point)
void printLWPOINT(LWPOINT *point)
POINTARRAY * ptarray_construct(char hasz, char hasm, uint32_t npoints)
Construct an empty pointarray, allocating storage and setting the npoints, but not filling in any inf...
LWPOINT * lwpoint_force_dims(const LWPOINT *point, int hasz, int hasm)
POINTARRAY * ptarray_clone(const POINTARRAY *ptarray)
Clone a POINTARRAY object.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
LWPOINT * lwpoint_grid(const LWPOINT *point, const gridspec *grid)
char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2)
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
int lwpoint_getPoint3dm_p(const LWPOINT *point, POINT3DM *out)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
void ptarray_free(POINTARRAY *pa)
LWPOINT * lwpoint_construct_empty(int srid, char hasz, char hasm)
int lwpoint_getPoint2d_p(const LWPOINT *point, POINT2D *out)
#define LWDEBUG(level, msg)
int lwpoint_getPoint3dz_p(const LWPOINT *point, POINT3DZ *out)
int getPoint3dm_p(const POINTARRAY *pa, int n, POINT3DM *point)
LWPOINT * lwpoint_make(int srid, int hasz, int hasm, const POINT4D *p)
LWPOINT * lwpoint_make3dm(int srid, double x, double y, double m)
int lwpoint_is_empty(const LWPOINT *point)
#define FLAGS_SET_Z(flags, value)
LWPOINT * lwpoint_make2d(int srid, double x, double y)
int getPoint3dz_p(const POINTARRAY *pa, int n, POINT3DZ *point)
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE, then a duplicate point will not be added.
#define FLAGS_GET_BBOX(flags)
#define LW_TRUE
Return types for functions with status returns.
void lwpoint_free(LWPOINT *pt)
LWPOINT * lwpoint_construct(int srid, GBOX *bbox, POINTARRAY *point)
POINTARRAY * ptarray_force_dims(const POINTARRAY *pa, int hasz, int hasm)
LWPOINT * lwpoint_make4d(int srid, double x, double y, double z, double m)
int getPoint2d_p(const POINTARRAY *pa, int n, POINT2D *point)
void lwpoint_release(LWPOINT *lwpoint)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
#define FLAGS_SET_BBOX(flags, value)
void printPA(POINTARRAY *pa)
char ptarray_same(const POINTARRAY *pa1, const POINTARRAY *pa2)
double lwpoint_get_m(const LWPOINT *point)
POINTARRAY * ptarray_grid(const POINTARRAY *pa, const gridspec *grid)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_M(flags)
void lwgeom_release(LWGEOM *lwgeom)
Free the containing LWGEOM and the associated BOX.
double lwpoint_get_x(const LWPOINT *point)
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
LWPOINT * lwpoint_make3dz(int srid, double x, double y, double z)
double lwpoint_get_z(const LWPOINT *point)
void * lwalloc(size_t size)
#define FLAGS_NDIMS(flags)
LWPOINT * lwpoint_clone(const LWPOINT *g)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
#define FLAGS_SET_M(flags, value)