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

◆ test_gdal_polygonize_interrupt()

static void test_gdal_polygonize_interrupt ( void  )
static

Definition at line 282 of file cu_gdal.c.

283{
285 int nPols = 0;
286 rt_geomval gv = NULL;
287
288 rt = fillRasterToPolygonize(0, 0.0);
289 CU_ASSERT(rt != NULL);
290
291 /* Why: confirm that the GDAL callback honours liblwgeom interrupts (#4222). */
293 gv = rt_raster_gdal_polygonize(rt, 0, TRUE, &nPols);
295
296 CU_ASSERT_PTR_NULL(gv);
297 CU_ASSERT_EQUAL(nPols, 0);
298
299 if (gv)
300 rtdealloc(gv);
301 cu_free_raster(rt);
302}
static rt_raster fillRasterToPolygonize(int hasnodata, double nodataval)
Definition cu_gdal.c:102
#define TRUE
Definition dbfopen.c:73
void lwgeom_request_interrupt(void)
Request interruption of any running code.
Definition lwgeom_api.c:658
void lwgeom_cancel_interrupt(void)
Cancel any interruption request.
Definition lwgeom_api.c:662
rt_geomval rt_raster_gdal_polygonize(rt_raster raster, int nband, int exclude_nodata_value, int *pnElements)
Returns a set of "geomval" value, one for each group of pixel sharing the same value for the provided...
void rtdealloc(void *mem)
Definition rt_context.c:206
void cu_free_raster(rt_raster raster)

References cu_free_raster(), fillRasterToPolygonize(), lwgeom_cancel_interrupt(), lwgeom_request_interrupt(), rt_raster_gdal_polygonize(), rtdealloc(), and TRUE.

Referenced by gdal_suite_setup().

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