97 CU_ASSERT(env == NULL);
101 CU_ASSERT(raster != NULL);
110 CU_ASSERT(raster != NULL);
119 CU_ASSERT(raster != NULL);
128 CU_ASSERT(raster != NULL);
136 CU_ASSERT_EQUAL(poly->
nrings, 1);
138 ring = poly->
rings[0];
139 CU_ASSERT(ring != NULL);
140 CU_ASSERT_EQUAL(ring->
npoints, 5);
143 CU_ASSERT_DOUBLE_EQUAL(pt.
x, 0.5, DBL_EPSILON);
144 CU_ASSERT_DOUBLE_EQUAL(pt.
y, 0.5, DBL_EPSILON);
147 CU_ASSERT_DOUBLE_EQUAL(pt.
x, 5.5, DBL_EPSILON);
148 CU_ASSERT_DOUBLE_EQUAL(pt.
y, 0.5, DBL_EPSILON);
151 CU_ASSERT_DOUBLE_EQUAL(pt.
x, 5.5, DBL_EPSILON);
152 CU_ASSERT_DOUBLE_EQUAL(pt.
y, -4.5, DBL_EPSILON);
155 CU_ASSERT_DOUBLE_EQUAL(pt.
x, 0.5, DBL_EPSILON);
156 CU_ASSERT_DOUBLE_EQUAL(pt.
y, -4.5, DBL_EPSILON);
159 CU_ASSERT_DOUBLE_EQUAL(pt.
x, 0.5, DBL_EPSILON);
160 CU_ASSERT_DOUBLE_EQUAL(pt.
y, 0.5, DBL_EPSILON);
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
void lwgeom_free(LWGEOM *geom)
LWPOLY * lwgeom_as_lwpoly(const LWGEOM *lwgeom)
void cu_free_raster(rt_raster raster)
void rt_raster_set_scale(rt_raster raster, double scaleX, double scaleY)
Set scale in projection units.
void rt_raster_set_offsets(rt_raster raster, double x, double y)
Set insertion points in projection units.
rt_errorstate rt_raster_get_envelope_geom(rt_raster raster, LWGEOM **env)
Get raster's envelope as a geometry.
int32_t rt_raster_get_srid(rt_raster raster)
Get raster's SRID.
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)