PostGIS
2.5.7dev-r@@SVN_REVISION@@
|
rt_errorstate rt_raster_iterator | ( | rt_iterator | itrset, |
uint16_t | itrcount, | ||
rt_extenttype | extenttype, | ||
rt_raster | customextent, | ||
rt_pixtype | pixtype, | ||
uint8_t | hasnodata, | ||
double | nodataval, | ||
uint16_t | distancex, | ||
uint16_t | distancey, | ||
rt_mask | mask, | ||
void * | userarg, | ||
int(*)(rt_iterator_arg arg, void *userarg, double *value, int *nodata) | callback, | ||
rt_raster * | rtnraster | ||
) |
n-raster iterator.
Returns a raster with one band. The raster returned should be freed by the caller
itrset | : set of rt_iterator objects. |
itrcount | : number of objects in itrset. |
extenttype | : type of extent for the output raster. |
customextent | : raster specifying custom extent. is only used if extenttype is ET_CUSTOM. |
pixtype | : the desired pixel type of the output raster's band. |
hasnodata | : indicates if the band has nodata value |
nodataval | : the nodata value, will be appropriately truncated to fit the pixtype size. |
distancex | : the number of pixels around the specified pixel along the X axis |
distancey | : the number of pixels around the specified pixel along the Y axis |
*userarg | : pointer to any argument that is passed as-is to callback. |
*callback | : callback function for actual processing of pixel values. |
*rtnraster | : return one band raster from iterator process |
The callback function must have the following signature.
int FNAME(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
The callback function must return zero (error) or non-zero (success) indicating whether the function ran successfully. The parameters passed to the callback function are as follows.
The raster returned should be freed by the caller
itrset | : set of rt_iterator objects. |
itrcount | : number of objects in itrset. |
extenttype | : type of extent for the output raster. |
customextent | : raster specifying custom extent. is only used if extenttype is ET_CUSTOM. |
pixtype | : the desired pixel type of the output raster's band. |
hasnodata | : indicates if the band has nodata value |
nodataval | : the nodata value, will be appropriately truncated to fit the pixtype size. |
distancex | : the number of pixels around the specified pixel along the X axis |
distancey | : the number of pixels around the specified pixel along the Y axis |
mask | : the object of mask |
userarg | : pointer to any argument that is passed as-is to callback. |
callback | : callback function for actual processing of pixel values. |
*rtnraster | : return one band raster from iterator process |
The callback function must have the following signature.
int FNAME(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
The callback function must return zero (error) or non-zero (success) indicating whether the function ran successfully. The parameters passed to the callback function are as follows.
Definition at line 812 of file rt_mapalgebra.c.
References _rti_iterator_arg_callback_clean(), _rti_iterator_arg_callback_init(), _rti_iterator_arg_destroy(), _rti_iterator_arg_empty_init(), _rti_iterator_arg_init(), _rti_iterator_arg_populate(), _rti_iterator_arg_t::arg, _rti_iterator_arg_t::band, rt_raster_t::bands, rt_iterator_arg_t::dst_pixel, _rti_iterator_arg_t::empty, ES_ERROR, ES_NONE, ET_CUSTOM, ET_FIRST, ET_INTERSECTION, ET_LAST, ET_SECOND, ET_UNION, _rti_iterator_arg_t::hasnodata, _rti_iterator_arg_t::isempty, _rti_iterator_arg_t::isnodata, _rti_iterator_arg_t::minval, rt_iterator_t::nbnodata, rt_pixel_t::nodata, rt_iterator_arg_t::nodata, _rti_iterator_arg_t::nodata, _rti_iterator_arg_t::nodataval, rt_raster_t::numBands, _rti_iterator_arg_t::offset, PT_END, rtpixdump::rast, _rti_iterator_arg_t::raster, RASTER_DEBUG, RASTER_DEBUGF, rt_band_destroy(), rt_band_get_min_value(), rt_band_get_nearest_pixel(), rt_band_get_pixel(), rt_band_set_pixel(), rt_pixel_set_to_array(), rt_raster_destroy(), rt_raster_from_two_rasters(), rt_raster_generate_new_band(), rt_raster_get_band(), rt_raster_get_height(), rt_raster_get_srid(), rt_raster_get_width(), rt_raster_get_x_offset(), rt_raster_get_x_scale(), rt_raster_get_x_skew(), rt_raster_get_y_offset(), rt_raster_get_y_scale(), rt_raster_get_y_skew(), rt_raster_is_empty(), rt_raster_new(), rt_raster_same_alignment(), rt_raster_set_scale(), rtalloc(), _rti_iterator_arg_t::rtband, rtdealloc(), rterror(), rtinfo(), rtrealloc(), rt_iterator_arg_t::src_pixel, rt_pixel_t::value, genraster::value, rt_iterator_arg_t::values, _rti_iterator_arg_t::values, rt_pixel_t::x, pixval::x, rt_pixel_t::y, and pixval::y.
Referenced by RASTER_clip(), RASTER_nMapAlgebra(), RASTER_nMapAlgebraExpr(), RASTER_setPixelValuesGeomval(), RASTER_union_finalfn(), RASTER_union_transfn(), and test_raster_iterator().