]> granicus.if.org Git - postgis/commitdiff
Fixed dimension error of bands when using ST_Tile on out-db rasters.
authorBborie Park <bkpark at ucdavis.edu>
Mon, 4 Feb 2013 19:07:28 +0000 (19:07 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Mon, 4 Feb 2013 19:07:28 +0000 (19:07 +0000)
Ticket #2198

git-svn-id: http://svn.osgeo.org/postgis/trunk@11079 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
raster/rt_core/rt_api.c
raster/rt_pg/rt_pg.c

diff --git a/NEWS b/NEWS
index 8fdc5265d6a2e56b74abd52bf6ff925d44f4a669..57b66233e5fec0511f39a5205be36eedff4e0776 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -140,6 +140,8 @@ PostGIS 2.1.0
   - #2182, Fix issue with outdb rasters with no SRID and ST_Resize
   - #2188, Fix function parameter value overflow that caused problems
            when copying data from a GDAL dataset
+  - #2198, Fix incorrect dimensions used when generating bands of out-db
+           rasters in ST_Tile()
 
 PostGIS 2.0.3
 2013/MM/DD
index c2e215304b43d4bb5f57e9a86059f51eb0a1a2ca..20903e32abf5043c37478b156a28c92e503d6836 100644 (file)
@@ -1587,7 +1587,6 @@ rt_band_load_offline_data(rt_band band) {
        double gt[6] = {0.};
        double ogt[6] = {0.};
        double offset[2] = {0};
-       int i = 0;
 
        rt_raster _rast = NULL;
        rt_band _band = NULL;
index f5815821eab9fc4827bd6f9161021d7550d7db53..97394765872e04d0dd775c8bd253283e09e85cbe 100644 (file)
@@ -5825,7 +5825,7 @@ Datum RASTER_tile(PG_FUNCTION_ARGS)
                                rt_band_get_ext_band_num(_band, &bandnum);
 
                                band = rt_band_new_offline(
-                                       arg2->raster.width, arg2->raster.height,
+                                       width, height,
                                        pixtype,
                                        hasnodata, nodataval,
                                        bandnum, rt_band_get_ext_path(_band)