]> granicus.if.org Git - postgis/commitdiff
Added support for padded edge tiles to ST_IsCoverageTile()
authorBborie Park <bkpark at ucdavis.edu>
Fri, 14 Dec 2012 20:27:30 +0000 (20:27 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Fri, 14 Dec 2012 20:27:30 +0000 (20:27 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10839 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpostgis.sql.in.c

index dfd9cfdb189c968b1bd1f2f4962593e7376b05c1..42df2cc34bdce37df7a177273db6a537448ebc2c 100644 (file)
@@ -5305,6 +5305,16 @@ CREATE OR REPLACE FUNCTION st_iscoveragetile(rast raster, coverage raster, tilew
                        END IF;
                END IF;
 
+               -- edge tile
+
+               -- edge tile may have same size as inner tile
+               IF 
+                       (_rastmeta.width = tilewidth) AND
+                       (_rastmeta.height = tileheight)
+               THEN
+                       RETURN TRUE;
+               END IF;
+
                -- get edge tile width and height
                edge[0] := _covmeta.width - ((max[0] - 1) * tilewidth);
                edge[1] := _covmeta.height - ((max[1] - 1) * tileheight);