PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ BOX3D_BOXLL_TEST()

static void BOX3D_BOXLL_TEST ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
)
static

Definition at line 1666 of file cu_geodetic.c.

1667{
1668 LWGEOM *lwg;
1669 GBOX gbox_gc;
1670 GBOX gbox_ll;
1671 char wkt[256];
1672 snprintf(wkt, 256, "LINESTRING(%f %f,%f %f)", xmin, ymin, xmax, ymax);
1674
1675 lwgeom_calculate_gbox_geodetic(lwg, &gbox_gc);
1676 lwgeom_free(lwg);
1677 // printf("\n%s",wkt);
1678
1679 gbox_geocentric_get_gbox_cartesian(&gbox_gc, &gbox_ll);
1680
1681 // printf("\nBOX(%g %g, %g %g)\n",
1682 // gbox_ll.xmin, gbox_ll.ymin,
1683 // gbox_ll.xmax, gbox_ll.ymax);
1684
1685 CU_ASSERT(gbox_ll.xmin <= xmin);
1686 CU_ASSERT(gbox_ll.ymin <= ymin);
1687 CU_ASSERT(gbox_ll.xmax >= xmax);
1688 CU_ASSERT(gbox_ll.ymax >= ymax);
1689}
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
#define LW_PARSER_CHECK_NONE
Definition liblwgeom.h:2149
int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox)
Calculate the geodetic bounding box for an LWGEOM.
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition lwin_wkt.c:940
int gbox_geocentric_get_gbox_cartesian(const GBOX *gbox_geocentric, GBOX *gbox_planar)
double ymax
Definition liblwgeom.h:357
double xmax
Definition liblwgeom.h:355
double ymin
Definition liblwgeom.h:356
double xmin
Definition liblwgeom.h:354

References gbox_geocentric_get_gbox_cartesian(), LW_PARSER_CHECK_NONE, lwgeom_calculate_gbox_geodetic(), lwgeom_free(), lwgeom_from_wkt(), GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.

Referenced by test_gbox_geocentric_get_gbox_cartesian().

Here is the call graph for this function:
Here is the caller graph for this function: