Definition at line 491 of file rt_util.c.
493 {
498
500 if (!rings) {
501 rterror(
"rt_util_envelope_to_lwpoly: Out of memory building envelope's geometry");
502 return NULL;
503 }
505 if (!rings[0]) {
506 rterror(
"rt_util_envelope_to_lwpoly: Out of memory building envelope's geometry ring");
507 return NULL;
508 }
509
510 pts = rings[0];
511
512
517
518
522
523
527
528
532
534 if (npoly == NULL) {
535 rterror(
"rt_util_envelope_to_lwpoly: Could not build envelope's geometry");
536 return NULL;
537 }
538
539 return npoly;
540}
LWPOLY * lwpoly_construct(int32_t srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
#define SRID_UNKNOWN
Unknown SRID value.
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...
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
void * rtalloc(size_t size)
Wrappers used for managing memory.
References lwpoly_construct(), rt_envelope::MaxX, rt_envelope::MaxY, rt_envelope::MinX, rt_envelope::MinY, ptarray_construct(), ptarray_set_point4d(), rtalloc(), rterror(), SRID_UNKNOWN, POINT4D::x, and POINT4D::y.
Referenced by rt_raster_compute_skewed_raster().