62 lwnotice(
"lwcircstring_construct: invalid point count %d", points->
npoints);
100 if ( ! curve )
return;
159 for (i = 0; i < npoints; i++)
163 lwerror(
"lwcurve_from_lwpointarray: invalid input type: %s",
169 if (zmflag == 3)
break;
172 if (zmflag == 0) ptsize = 2 *
sizeof(double);
173 else if (zmflag == 3) ptsize = 4 *
sizeof(double);
174 else ptsize = 3 *
sizeof(double);
179 size = ptsize * npoints;
181 memset(newpoints, 0, size);
184 for (i = 0; i < npoints; i++)
207 if (zmflag == 0) ptsize = 2 *
sizeof(double);
208 else if (zmflag == 3) ptsize = 4 *
sizeof(double);
209 else ptsize = 3 *
sizeof(double);
212 size = ptsize * mpoint->
ngeoms;
214 memset(newpoints, 0, size);
217 for (i = 0; i < mpoint->
ngeoms; i++)
227 LWDEBUGF(3,
"lwcurve_from_lwmpoint: constructed pointarray for %d points, %d zmflag", mpoint->
ngeoms, zmflag);
326 if ( opa->
npoints < 2 )
return NULL;
void ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d)
LWCIRCSTRING * lwcircstring_addpoint(LWCIRCSTRING *curve, LWPOINT *point, uint32_t where)
LWCIRCSTRING * lwcircstring_from_lwpointarray(int srid, uint32_t npoints, LWPOINT **points)
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
void lwcircstring_setPoint4d(LWCIRCSTRING *curve, uint32_t index, POINT4D *newpoint)
LWLINE * lwline_clone(const LWLINE *lwgeom)
int ptarray_is_closed_3d(const POINTARRAY *pa)
LWGEOM * lwcircstring_as_lwgeom(const LWCIRCSTRING *obj)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
void ptarray_free(POINTARRAY *pa)
#define FLAGS_GET_ZM(flags)
double lwcircstring_length_2d(const LWCIRCSTRING *circ)
LWCIRCSTRING * lwcircstring_clone(const LWCIRCSTRING *g)
int ptarray_is_closed_2d(const POINTARRAY *pa)
POINTARRAY * ptarray_addPoint(const POINTARRAY *pa, uint8_t *p, size_t pdims, uint32_t where)
Add a point in a pointarray.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
POINT4D getPoint4d(const POINTARRAY *pa, int n)
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.
int lwcircstring_is_closed(const LWCIRCSTRING *curve)
LWCIRCSTRING * lwcircstring_construct_empty(int srid, char hasz, char hasm)
LWCIRCSTRING * lwcircstring_removepoint(LWCIRCSTRING *curve, uint32_t index)
void printLWCIRCSTRING(LWCIRCSTRING *curve)
#define LW_TRUE
Return types for functions with status returns.
void lwcircstring_free(LWCIRCSTRING *curve)
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
int ptarray_point_size(const POINTARRAY *pa)
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.
#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.
void lwcircstring_reverse(LWCIRCSTRING *curve)
char lwcircstring_same(const LWCIRCSTRING *me, const LWCIRCSTRING *you)
#define FLAGS_SET_BBOX(flags, value)
LWCIRCSTRING * lwcircstring_from_lwmpoint(int srid, LWMPOINT *mpoint)
void printPA(POINTARRAY *pa)
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 ...
void lwcircstring_release(LWCIRCSTRING *lwcirc)
POINTARRAY * ptarray_grid(const POINTARRAY *pa, const gridspec *grid)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWPOINT * lwcircstring_get_lwpoint(const LWCIRCSTRING *circ, int where)
void ptarray_reverse(POINTARRAY *pa)
#define FLAGS_GET_M(flags)
void lwgeom_release(LWGEOM *lwgeom)
Free the containing LWGEOM and the associated BOX.
POINTARRAY * ptarray_removePoint(POINTARRAY *pa, uint32_t where)
Remove a point from a pointarray.
LWPOINT * lwpoint_construct(int srid, GBOX *bbox, POINTARRAY *point)
void * lwalloc(size_t size)
int lwcircstring_is_empty(const LWCIRCSTRING *circ)
#define LWDEBUGF(level, msg,...)
#define FLAGS_NDIMS(flags)
double lwcircstring_length(const LWCIRCSTRING *circ)
LWCIRCSTRING * lwcircstring_construct(int srid, GBOX *bbox, POINTARRAY *points)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
LWCIRCSTRING * lwcircstring_grid(const LWCIRCSTRING *line, const gridspec *grid)