61 lwnotice(
"lwcircstring_construct: invalid point count %d", points->
npoints);
99 if ( ! curve )
return;
152 for (i = 0; i < npoints; i++)
156 lwerror(
"lwcurve_from_lwpointarray: invalid input type: %s",
162 if (zmflag == 3)
break;
165 if (zmflag == 0) ptsize = 2 *
sizeof(double);
166 else if (zmflag == 3) ptsize = 4 *
sizeof(double);
167 else ptsize = 3 *
sizeof(double);
172 size = ptsize * npoints;
174 memset(newpoints, 0, size);
177 for (i = 0; i < npoints; i++)
200 if (zmflag == 0) ptsize = 2 *
sizeof(double);
201 else if (zmflag == 3) ptsize = 4 *
sizeof(double);
202 else ptsize = 3 *
sizeof(double);
205 size = ptsize * mpoint->
ngeoms;
207 memset(newpoints, 0, size);
210 for (i = 0; i < mpoint->
ngeoms; i++)
220 LWDEBUGF(3,
"lwcurve_from_lwmpoint: constructed pointarray for %d points, %d zmflag", mpoint->
ngeoms, zmflag);
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
POINTARRAY * ptarray_construct_reference_data(char hasz, char hasm, uint32_t npoints, uint8_t *ptlist)
Construct a new POINTARRAY, referencing to the data from ptlist.
POINT4D getPoint4d(const POINTARRAY *pa, uint32_t n)
int ptarray_is_closed_3d(const POINTARRAY *pa)
POINTARRAY * ptarray_removePoint(POINTARRAY *pa, uint32_t where)
Remove a point from a pointarray.
uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
POINTARRAY * ptarray_addPoint(const POINTARRAY *pa, uint8_t *p, size_t pdims, uint32_t where)
Add a point in a pointarray.
#define FLAGS_SET_BBOX(flags, value)
void printPA(POINTARRAY *pa)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
#define FLAGS_NDIMS(flags)
LWPOINT * lwpoint_construct(int srid, GBOX *bbox, POINTARRAY *point)
size_t ptarray_point_size(const POINTARRAY *pa)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define FLAGS_GET_M(flags)
void ptarray_free(POINTARRAY *pa)
#define FLAGS_GET_ZM(flags)
LWGEOM * lwcircstring_as_lwgeom(const LWCIRCSTRING *obj)
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)
int ptarray_is_closed_2d(const POINTARRAY *pa)
#define LW_TRUE
Return types for functions with status returns.
void lwgeom_release(LWGEOM *lwgeom)
Free the containing LWGEOM and the associated BOX.
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
LWLINE * lwline_clone(const LWLINE *lwgeom)
char ptarray_same(const POINTARRAY *pa1, const POINTARRAY *pa2)
double ptarray_arc_length_2d(const POINTARRAY *pts)
Find the 2d length of the given POINTARRAY, using circular arc interpolation between each coordinate ...
LWPOINT * lwcircstring_get_lwpoint(const LWCIRCSTRING *circ, uint32_t where)
double lwcircstring_length_2d(const LWCIRCSTRING *circ)
LWCIRCSTRING * lwcircstring_construct_empty(int srid, char hasz, char hasm)
int lwcircstring_is_closed(const LWCIRCSTRING *curve)
LWCIRCSTRING * lwcircstring_addpoint(LWCIRCSTRING *curve, LWPOINT *point, uint32_t where)
void lwcircstring_setPoint4d(LWCIRCSTRING *curve, uint32_t index, POINT4D *newpoint)
LWCIRCSTRING * lwcircstring_from_lwpointarray(int srid, uint32_t npoints, LWPOINT **points)
LWCIRCSTRING * lwcircstring_removepoint(LWCIRCSTRING *curve, uint32_t index)
char lwcircstring_same(const LWCIRCSTRING *me, const LWCIRCSTRING *you)
void lwcircstring_free(LWCIRCSTRING *curve)
LWCIRCSTRING * lwcircstring_clone(const LWCIRCSTRING *g)
LWCIRCSTRING * lwcircstring_construct(int srid, GBOX *bbox, POINTARRAY *points)
void printLWCIRCSTRING(LWCIRCSTRING *curve)
void lwcircstring_release(LWCIRCSTRING *lwcirc)
double lwcircstring_length(const LWCIRCSTRING *circ)
int lwcircstring_is_empty(const LWCIRCSTRING *circ)
LWCIRCSTRING * lwcircstring_from_lwmpoint(int srid, LWMPOINT *mpoint)
#define LWDEBUGF(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.