238{
242 uint32_t num_points;
245 uint32_t i;
246 int success;
247
250
254 for (i = 0; i < num_points; i++)
255 {
257 {
258 uint32_t j;
259 for (j = 0; j < i; j++)
260 {
262 }
266 }
267
271 }
273
276
277
278
279
281
282 for (i = 0; i < num_points; i++)
283 {
285 }
288
289 if (!success)
290 return NULL;
291
293}
char result[OUT_DOUBLE_BUFFER_SIZE]
LWPOINTITERATOR * lwpointiterator_create(const LWGEOM *g)
Create a new LWPOINTITERATOR over supplied LWGEOM*.
int lwpointiterator_next(LWPOINTITERATOR *s, POINT4D *p)
Attempts to assign the next point in the iterator to p, and advances the iterator to the next point.
void lwpointiterator_destroy(LWPOINTITERATOR *s)
Free all memory associated with the iterator.
void * lwalloc(size_t size)
uint32_t lwgeom_count_vertices(const LWGEOM *geom)
Count the total number of vertices in any LWGEOM.
static void supporting_points_destroy(SUPPORTING_POINTS *s)
static int calculate_mbc(const POINT2D **points, uint32_t max_n, SUPPORTING_POINTS *support, LWBOUNDINGCIRCLE *mbc)
static SUPPORTING_POINTS * supporting_points_create()
static LWBOUNDINGCIRCLE * lwboundingcircle_create()
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)