141{
142 uint32_t i;
144 int has_z = 0, has_m = 0;
146
147
148
149
150 for (i = 0; i < npoints; i++)
151 {
154 {
156 return NULL;
157 }
160 if (has_z && has_m) break;
161 }
162
163
164
165
167
168 for (i = 0; i < npoints; i++)
169 {
170 const LWPOINT *lwpt = points[i];
172 {
173 lwerror(
"%s: failed getPoint4d_p", __func__);
174 return NULL;
175 }
177 }
178
180}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
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...
LWCIRCSTRING * lwcircstring_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.