]> granicus.if.org Git - postgis/commitdiff
Added docs regarding the callback function for rt_raster_iterator()
authorBborie Park <bkpark at ucdavis.edu>
Tue, 25 Sep 2012 22:22:40 +0000 (22:22 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Tue, 25 Sep 2012 22:22:40 +0000 (22:22 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10332 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_core/rt_api.c
raster/rt_core/rt_api.h

index 245b6ef3f05c2a48188241e5fe40544b3c9fb979..ea436992f10c2ca4a867c2b22c7a2087ecdeed73 100644 (file)
@@ -13156,6 +13156,19 @@ _rti_param_arg_clean(_rti_param _param) {
  * @param callback: callback function for actual processing of pixel values.
  * @param noerr: if 0, error occurred
  *
+ * 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.
+ *
+ * - rt_iterator_arg arg: struct containing pixel values, NODATA flags and metadata
+ * - void *userarg: NULL or calling function provides to rt_raster_iterator() for use by callback function
+ * - double *value: value of pixel to be burned by rt_raster_iterator()
+ * - int *nodata: flag (0 or 1) indicating that pixel to be burned is NODATA
+ *
  * @return raster object if success, NULL otherwise
  */
 rt_raster
index 17d2be4d1006f095fa0662d4e5353f4e47ceebbd..f134d117abbbcaffc4ccc8175ca0784320fa3698 100644 (file)
@@ -1752,6 +1752,19 @@ rt_raster_from_two_rasters(
  * @param callback: callback function for actual processing of pixel values.
  * @param noerr: if 0, error occurred
  *
+ * 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.
+ *
+ * - rt_iterator_arg arg: struct containing pixel values, NODATA flags and metadata
+ * - void *userarg: NULL or calling function provides to rt_raster_iterator() for use by callback function
+ * - double *value: value of pixel to be burned by rt_raster_iterator()
+ * - int *nodata: flag (0 or 1) indicating that pixel to be burned is NODATA
+ *
  * @return raster object if success, NULL otherwise
  */
 rt_raster