PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ test_raster_empty()

static void test_raster_empty ( )
static

Definition at line 43 of file cu_raster_basics.c.

References cu_free_raster(), rtrowdump::raster, rt_raster_is_empty(), and rt_raster_new().

Referenced by raster_basics_suite_setup().

43  {
44  rt_raster raster = NULL;
45 
46  /* check that raster is empty */
47  raster = rt_raster_new(0, 0);
48  CU_ASSERT(raster != NULL);
49  CU_ASSERT(rt_raster_is_empty(raster));
50  cu_free_raster(raster);
51 
52  /* create raster */
53  raster = rt_raster_new(1, 1);
54  CU_ASSERT(raster != NULL);
55 
56  /* check that raster is not empty */
57  CU_ASSERT(!rt_raster_is_empty(raster));
58 
59  cu_free_raster(raster);
60 }
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121
int rt_raster_is_empty(rt_raster raster)
Return TRUE if the raster is empty.
Definition: rt_raster.c:1338
void cu_free_raster(rt_raster raster)
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
Definition: rt_raster.c:48
Here is the call graph for this function:
Here is the caller graph for this function: