]> granicus.if.org Git - postgis/commitdiff
Expanded on comments about things to keep in mind when using rt_band_set_pixel_line()
authorBborie Park <bkpark at ucdavis.edu>
Fri, 27 Jul 2012 22:49:13 +0000 (22:49 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Fri, 27 Jul 2012 22:49:13 +0000 (22:49 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10132 b70326c6-7e19-0410-871a-916f4a2858ee

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

index 3b31d2de171c40ea92a7324b78b2d5e775a231f3..f3f8baf56946e1fbaeb84c8ec5fa6243691b6d11 100644 (file)
@@ -1914,6 +1914,12 @@ rt_band_set_nodata(rt_band band, double val) {
  * values in vals are expected to be of the band's pixel type
  * as this function uses memcpy.
  *
+ * It is important to be careful when using this function as
+ * the number of values being set may exceed a pixel "row".
+ * Remember that the band values are stored in a stream (1-D array)
+ * regardless of what the raster's width and height might be.
+ * So, setting a number of values may cross multiple pixel "rows".
+ *
  * @param band : the band to set value to
  * @param x : X coordinate (0-based)
  * @param y : Y coordinate (0-based)
index 144d8ec07fa2186e8a1b6af3ff94f2e2b8b5c4be..26e72a3f87a73ed6977aa3fc302bc3f8a51824ab 100644 (file)
@@ -541,6 +541,12 @@ double rt_band_get_nodata(rt_band band);
  * values in vals are expected to be of the band's pixel type
  * as this function uses memcpy.
  *
+ * It is important to be careful when using this function as
+ * the number of values being set may exceed a pixel "row".
+ * Remember that the band values are stored in a stream (1-D array)
+ * regardless of what the raster's width and height might be.
+ * So, setting a number of values may cross multiple pixel "rows".
+ *
  * @param band : the band to set value to
  * @param x : X coordinate (0-based)
  * @param y : Y coordinate (0-based)