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.
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
#define FLAGS_GET_BBOX(flags)
#define FLAGS_SET_BBOX(flags, value)
void printPA(POINTARRAY *pa)
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *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...
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
int getPoint3dz_p(const POINTARRAY *pa, uint32_t n, POINT3DZ *point)
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
#define FLAGS_NDIMS(flags)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
#define FLAGS_GET_M(flags)
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
void ptarray_free(POINTARRAY *pa)
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,...
void * lwalloc(size_t size)
#define LW_TRUE
Return types for functions with status returns.
int getPoint3dm_p(const POINTARRAY *pa, uint32_t n, POINT3DM *point)
#define FLAGS_SET_M(flags, value)
void lwgeom_release(LWGEOM *lwgeom)
Free the containing LWGEOM and the associated BOX.
#define FLAGS_SET_Z(flags, value)
POINTARRAY * ptarray_clone(const POINTARRAY *ptarray)
Clone a POINTARRAY object.
char ptarray_same(const POINTARRAY *pa1, const POINTARRAY *pa2)
POINTARRAY * ptarray_force_dims(const POINTARRAY *pa, int hasz, int hasm)
#define LWDEBUG(level, msg)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
LWPOINT * lwpoint_make2d(int srid, double x, double y)
double lwpoint_get_m(const LWPOINT *point)
void lwpoint_free(LWPOINT *pt)
void lwpoint_release(LWPOINT *lwpoint)
LWPOINT * lwpoint_force_dims(const LWPOINT *point, int hasz, int hasm)
int lwpoint_getPoint3dm_p(const LWPOINT *point, POINT3DM *out)
double lwpoint_get_x(const LWPOINT *point)
int lwpoint_is_empty(const LWPOINT *point)
int lwpoint_getPoint3dz_p(const LWPOINT *point, POINT3DZ *out)
LWPOINT * lwpoint_construct(int srid, GBOX *bbox, POINTARRAY *point)
LWPOINT * lwpoint_make3dm(int srid, double x, double y, double m)
LWPOINT * lwpoint_clone(const LWPOINT *g)
void printLWPOINT(LWPOINT *point)
LWPOINT * lwpoint_make3dz(int srid, double x, double y, double z)
double lwpoint_get_z(const LWPOINT *point)
LWPOINT * lwpoint_construct_empty(int srid, char hasz, char hasm)
int lwpoint_getPoint2d_p(const LWPOINT *point, POINT2D *out)
LWPOINT * lwpoint_make(int srid, int hasz, int hasm, const POINT4D *p)
LWPOINT * lwpoint_make4d(int srid, double x, double y, double z, double m)
double lwpoint_get_y(const LWPOINT *point)
char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2)