]> granicus.if.org Git - postgis/commitdiff
Renamed variants of ST_World2RasterCoord() and ST_Raster2WorldCoord() to
authorBborie Park <bkpark at ucdavis.edu>
Mon, 26 Nov 2012 19:13:04 +0000 (19:13 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Mon, 26 Nov 2012 19:13:04 +0000 (19:13 +0000)
ST_WorldToRasterCoord() and ST_RasterToWorldCoord() as names are
inconsistent with other PostGIS function names. Ticket #2104

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

12 files changed:
NEWS
doc/reference_raster.xml
raster/rt_pg/rtpostgis.sql.in.c
raster/rt_pg/rtpostgis_drop.sql.in.c
raster/test/regress/Makefile.in
raster/test/regress/rt_pixelascentroids.sql
raster/test/regress/rt_pixelaspoints.sql
raster/test/regress/rt_rastertoworldcoord.sql [moved from raster/test/regress/rt_raster2worldcoord.sql with 72% similarity]
raster/test/regress/rt_rastertoworldcoord_expected [moved from raster/test/regress/rt_raster2worldcoord_expected with 100% similarity]
raster/test/regress/rt_utility.sql
raster/test/regress/rt_worldtorastercoord.sql [moved from raster/test/regress/rt_world2rastercoord.sql with 67% similarity]
raster/test/regress/rt_worldtorastercoord_expected [moved from raster/test/regress/rt_world2rastercoord_expected with 100% similarity]

diff --git a/NEWS b/NEWS
index 5f5a4cdca2ff6c49d9d7b51ff23ae979838fa8f5..87d0cf164abceec26d021258f31d0796946e79e4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,11 @@ PostGIS 2.1.0
     Use ST_MapAlgebra instead
   - 1 and 2 raster variants of ST_MapAlgebraExpr.
     Use expression variants of ST_MapAlgebra instead
+  - #2104, ST_World2RasterCoord, ST_World2RasterCoordX and
+    ST_World2RasterCoordY renamed to ST_WorldToRasterCoord,
+    ST_WorldToRasterCoordX and ST_WorldToRasterCoordY. ST_Raster2WorldCoord,
+    ST_Raster2WorldCoordX and ST_Raster2WorldCoordY renamed to
+    ST_RasterToWorldCoord, ST_RasterToWorldCoordX and ST_RasterToWorldCoordY
 
 * New Features *
 
index 39f5bf9101c1da0bb795a46cb54c0e582df46c65..8263044f87750c185c50b8048c923e6432d76751 100644 (file)
@@ -2180,16 +2180,16 @@ FROM dummy_rast;
                        </refsection>
                </refentry>
 
-               <refentry id="RT_ST_Raster2WorldCoord">
+               <refentry id="RT_ST_RasterToWorldCoord">
                        <refnamediv>
-                               <refname>ST_Raster2WorldCoord</refname>
+                               <refname>ST_RasterToWorldCoord</refname>
                                <refpurpose>Returns the raster's upper left corner as geometric X and Y (longitude and latitude) given a column and row. Column and row starts at 1.</refpurpose>
                        </refnamediv>
                
                        <refsynopsisdiv>
                                <funcsynopsis>
                                  <funcprototype>
-                                       <funcdef>record <function>ST_Raster2WorldCoord</function></funcdef>
+                                       <funcdef>record <function>ST_RasterToWorldCoord</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>xcolumn</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>yrow</parameter></paramdef>
@@ -2216,8 +2216,8 @@ FROM dummy_rast;
 -- non-skewed raster
 SELECT
        rid,
-       (ST_Raster2WorldCoord(rast,1, 1)).*,
-       (ST_Raster2WorldCoord(rast,2, 2)).*
+       (ST_RasterToWorldCoord(rast,1, 1)).*,
+       (ST_RasterToWorldCoord(rast,2, 2)).*
 FROM dummy_rast
 
  rid | longitude  | latitude | longitude |  latitude  
@@ -2230,8 +2230,8 @@ FROM dummy_rast
 -- skewed raster
 SELECT
        rid,
-       (ST_Raster2WorldCoord(rast, 1, 1)).*,
-       (ST_Raster2WorldCoord(rast, 2, 3)).*
+       (ST_RasterToWorldCoord(rast, 1, 1)).*,
+       (ST_RasterToWorldCoord(rast, 2, 3)).*
 FROM (
        SELECT
                rid,
@@ -2251,16 +2251,16 @@ FROM (
                        <refsection>
                                <title>See Also</title>
                                <para>
-                                       <xref linkend="RT_ST_Raster2WorldCoordX" />, 
-                                       <xref linkend="RT_ST_Raster2WorldCoordY" />, 
+                                       <xref linkend="RT_ST_RasterToWorldCoordX" />, 
+                                       <xref linkend="RT_ST_RasterToWorldCoordY" />, 
                                        <xref linkend="RT_ST_SetSkew" />
                                </para>
                        </refsection>
                </refentry>
                
-               <refentry id="RT_ST_Raster2WorldCoordX">
+               <refentry id="RT_ST_RasterToWorldCoordX">
                        <refnamediv>
-                               <refname>ST_Raster2WorldCoordX</refname>
+                               <refname>ST_RasterToWorldCoordX</refname>
                                <refpurpose>Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns
                                        and rows starts at 1.</refpurpose>
                        </refnamediv>
@@ -2268,12 +2268,12 @@ FROM (
                        <refsynopsisdiv>
                                <funcsynopsis>
                                  <funcprototype>
-                                       <funcdef>float8 <function>ST_Raster2WorldCoordX</function></funcdef>
+                                       <funcdef>float8 <function>ST_RasterToWorldCoordX</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>xcolumn</parameter></paramdef>
                                  </funcprototype>
                                  <funcprototype>
-                                       <funcdef>float8 <function>ST_Raster2WorldCoordX</function></funcdef>
+                                       <funcdef>float8 <function>ST_RasterToWorldCoordX</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>xcolumn</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>yrow</parameter></paramdef>
@@ -2292,6 +2292,9 @@ FROM (
                                <note><para>For non-skewed rasters, providing the X column is sufficient.  For skewed rasters,
                                                the georeferenced coordinate is a function of the ST_ScaleX and ST_SkewX and row and column.
                                                An error will be raised if you give just the X column for a skewed raster.</para></note>
+
+                               <para>Changed: 2.1.0 In prior versions, this was called ST_Raster2WorldCoordX</para>
+
                                </refsection>
                                
                                <refsection>
@@ -2299,8 +2302,8 @@ FROM (
                                
                                        <programlisting>
 -- non-skewed raster providing column is sufficient                                    
-SELECT rid, ST_Raster2WorldCoordX(rast,1) As x1coord, 
-       ST_Raster2WorldCoordX(rast,2) As x2coord,
+SELECT rid, ST_RasterToWorldCoordX(rast,1) As x1coord, 
+       ST_RasterToWorldCoordX(rast,2) As x2coord,
        ST_ScaleX(rast) As pixelx
 FROM dummy_rast;
 
@@ -2312,8 +2315,8 @@ FROM dummy_rast;
                                
                                        <programlisting>
 -- for fun lets skew it                                
-SELECT rid, ST_Raster2WorldCoordX(rast, 1, 1) As x1coord, 
-       ST_Raster2WorldCoordX(rast, 2, 3) As x2coord,
+SELECT rid, ST_RasterToWorldCoordX(rast, 1, 1) As x1coord, 
+       ST_RasterToWorldCoordX(rast, 2, 3) As x2coord,
        ST_ScaleX(rast) As pixelx
 FROM (SELECT rid, ST_SetSkew(rast, 100.5, 0) As rast FROM dummy_rast) As foo;
 
@@ -2328,13 +2331,13 @@ FROM (SELECT rid, ST_SetSkew(rast, 100.5, 0) As rast FROM dummy_rast) As foo;
                        <!-- Optionally add a "See Also" section -->
                        <refsection>
                                <title>See Also</title>
-                               <para><xref linkend="RT_ST_ScaleX" />, <xref linkend="RT_ST_Raster2WorldCoordY" />, <xref linkend="RT_ST_SetSkew" />, <xref linkend="RT_ST_SkewX" /></para>
+                               <para><xref linkend="RT_ST_ScaleX" />, <xref linkend="RT_ST_RasterToWorldCoordY" />, <xref linkend="RT_ST_SetSkew" />, <xref linkend="RT_ST_SkewX" /></para>
                        </refsection>
                </refentry>
 
-               <refentry id="RT_ST_Raster2WorldCoordY">
+               <refentry id="RT_ST_RasterToWorldCoordY">
                        <refnamediv>
-                               <refname>ST_Raster2WorldCoordY</refname>
+                               <refname>ST_RasterToWorldCoordY</refname>
                                <refpurpose>Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns
                                        and rows starts at 1. </refpurpose>
                        </refnamediv>
@@ -2342,12 +2345,12 @@ FROM (SELECT rid, ST_SetSkew(rast, 100.5, 0) As rast FROM dummy_rast) As foo;
                        <refsynopsisdiv>
                                <funcsynopsis>
                                  <funcprototype>
-                                       <funcdef>float8 <function>ST_Raster2WorldCoordY</function></funcdef>
+                                       <funcdef>float8 <function>ST_RasterToWorldCoordY</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>yrow</parameter></paramdef>
                                  </funcprototype>
                                  <funcprototype>
-                                       <funcdef>float8 <function>ST_Raster2WorldCoordY</function></funcdef>
+                                       <funcdef>float8 <function>ST_RasterToWorldCoordY</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>xcolumn</parameter></paramdef>
                                        <paramdef><type>integer </type> <parameter>yrow</parameter></paramdef>
@@ -2366,6 +2369,8 @@ FROM (SELECT rid, ST_SetSkew(rast, 100.5, 0) As rast FROM dummy_rast) As foo;
                                <note><para>For non-skewed rasters, providing the Y column is sufficient. For skewed rasters,
                                                the georeferenced coordinate is a function of the ST_ScaleY and ST_SkewY and row and column.
                                                An error will be raised if you give just the Y row for a skewed raster.</para></note>
+
+                               <para>Changed: 2.1.0 In prior versions, this was called ST_Raster2WorldCoordY</para>
                                </refsection>
                                
                                <refsection>
@@ -2373,8 +2378,8 @@ FROM (SELECT rid, ST_SetSkew(rast, 100.5, 0) As rast FROM dummy_rast) As foo;
                                
                                        <programlisting>
 -- non-skewed raster providing row is sufficient                                       
-SELECT rid, ST_Raster2WorldCoordY(rast,1) As y1coord, 
-       ST_Raster2WorldCoordY(rast,3) As y2coord,
+SELECT rid, ST_RasterToWorldCoordY(rast,1) As y1coord, 
+       ST_RasterToWorldCoordY(rast,3) As y2coord,
        ST_ScaleY(rast) As pixely
 FROM dummy_rast;
 
@@ -2386,8 +2391,8 @@ FROM dummy_rast;
                                
                                        <programlisting>
 -- for fun lets skew it                                
-SELECT rid, ST_Raster2WorldCoordY(rast,1,1) As y1coord, 
-       ST_Raster2WorldCoordY(rast,2,3) As y2coord,
+SELECT rid, ST_RasterToWorldCoordY(rast,1,1) As y1coord, 
+       ST_RasterToWorldCoordY(rast,2,3) As y2coord,
        ST_ScaleY(rast) As pixely
 FROM (SELECT rid, ST_SetSkew(rast,0,100.5) As rast FROM dummy_rast) As foo;
 
@@ -2402,7 +2407,7 @@ FROM (SELECT rid, ST_SetSkew(rast,0,100.5) As rast FROM dummy_rast) As foo;
                        <!-- Optionally add a "See Also" section -->
                        <refsection>
                                <title>See Also</title>
-                               <para><xref linkend="RT_ST_ScaleY" />, <xref linkend="RT_ST_Raster2WorldCoordX" />, <xref linkend="RT_ST_SetSkew" />, <xref linkend="RT_ST_SkewY" /></para>
+                               <para><xref linkend="RT_ST_ScaleY" />, <xref linkend="RT_ST_RasterToWorldCoordX" />, <xref linkend="RT_ST_SetSkew" />, <xref linkend="RT_ST_SkewY" /></para>
                        </refsection>
                </refentry>
 
@@ -2724,22 +2729,22 @@ rastwidth
                </refentry>
                
 
-               <refentry id="RT_ST_World2RasterCoord">
+               <refentry id="RT_ST_WorldToRasterCoord">
                        <refnamediv>
-                               <refname>ST_World2RasterCoord</refname>
+                               <refname>ST_WorldToRasterCoord</refname>
                                <refpurpose>    Returns the upper left corner as column and row given geometric X and Y (longitude and latitude) or a point geometry expressed in the spatial reference coordinate system of the raster.</refpurpose>
                        </refnamediv>
                
                        <refsynopsisdiv>
                                <funcsynopsis>
                                  <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoord</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoord</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
                                  </funcprototype>
                                  
                                   <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoord</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoord</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>longitude</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>latitude</parameter></paramdef>
@@ -2766,8 +2771,8 @@ rastwidth
                                <programlisting>
 SELECT
        rid,
-       (ST_World2RasterCoord(rast,3427927.8,20.5)).*,
-       (ST_World2RasterCoord(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast)))).*
+       (ST_WorldToRasterCoord(rast,3427927.8,20.5)).*,
+       (ST_WorldToRasterCoord(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast)))).*
 FROM dummy_rast;
 
  rid | columnx |   rowy    | columnx |   rowy    
@@ -2781,18 +2786,18 @@ FROM dummy_rast;
                        <refsection>
                                <title>See Also</title>
                                <para>
-                                       <xref linkend="RT_ST_World2RasterCoordX" />,
-                                       <xref linkend="RT_ST_World2RasterCoordY" />,
-                                       <xref linkend="RT_ST_Raster2WorldCoordX" />,
-                                       <xref linkend="RT_ST_Raster2WorldCoordY" />,
+                                       <xref linkend="RT_ST_WorldToRasterCoordX" />,
+                                       <xref linkend="RT_ST_WorldToRasterCoordY" />,
+                                       <xref linkend="RT_ST_RasterToWorldCoordX" />,
+                                       <xref linkend="RT_ST_RasterToWorldCoordY" />,
                                        <xref linkend="RT_ST_SRID" />
                                </para>
                        </refsection>
                </refentry>
 
-               <refentry id="RT_ST_World2RasterCoordX">
+               <refentry id="RT_ST_WorldToRasterCoordX">
                        <refnamediv>
-                               <refname>ST_World2RasterCoordX</refname>
+                               <refname>ST_WorldToRasterCoordX</refname>
                                <refpurpose>Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented
                                in world spatial reference system of raster.</refpurpose>
                        </refnamediv>
@@ -2800,19 +2805,19 @@ FROM dummy_rast;
                        <refsynopsisdiv>
                                <funcsynopsis>
                                  <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoordX</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoordX</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
                                  </funcprototype>
                                  
                                  <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoordX</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoordX</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>xw</parameter></paramdef>
                                  </funcprototype>
                                  
                                   <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoordX</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoordX</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>xw</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>yw</parameter></paramdef>
@@ -2825,14 +2830,15 @@ FROM dummy_rast;
                                
                                <para>Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw).  A point, or (both xw and yw world coordinates are required if a raster is skewed).  If a raster
                                        is not skewed then xw is sufficient. World coordinates are in the spatial reference coordinate system of the raster.</para>
+                               <para>Changed: 2.1.0 In prior versions, this was called ST_World2RasterCoordX</para>
                        </refsection>
                                
                        <refsection>
                                <title>Examples</title>
                        
-                               <programlisting>SELECT rid, ST_World2RasterCoordX(rast,3427927.8) As xcoord, 
-               ST_World2RasterCoordX(rast,3427927.8,20.5) As xcoord_xwyw, 
-               ST_World2RasterCoordX(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast))) As ptxcoord
+                               <programlisting>SELECT rid, ST_WorldToRasterCoordX(rast,3427927.8) As xcoord, 
+               ST_WorldToRasterCoordX(rast,3427927.8,20.5) As xcoord_xwyw, 
+               ST_WorldToRasterCoordX(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast))) As ptxcoord
 FROM dummy_rast;
 
  rid | xcoord  |  xcoord_xwyw   | ptxcoord
@@ -2846,16 +2852,16 @@ FROM dummy_rast;
                        <refsection>
                                <title>See Also</title>
                                <para>
-                                       <xref linkend="RT_ST_Raster2WorldCoordX" />, 
-                                       <xref linkend="RT_ST_Raster2WorldCoordY" />, 
+                                       <xref linkend="RT_ST_RasterToWorldCoordX" />, 
+                                       <xref linkend="RT_ST_RasterToWorldCoordY" />, 
                                        <xref linkend="RT_ST_SRID" />
                                </para>
                        </refsection>
                </refentry>
                
-               <refentry id="RT_ST_World2RasterCoordY">
+               <refentry id="RT_ST_WorldToRasterCoordY">
                        <refnamediv>
-                               <refname>ST_World2RasterCoordY</refname>
+                               <refname>ST_WorldToRasterCoordY</refname>
                                <refpurpose>Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented
                                in world spatial reference system of raster.</refpurpose>
                        </refnamediv>
@@ -2863,19 +2869,19 @@ FROM dummy_rast;
                        <refsynopsisdiv>
                                <funcsynopsis>
                                  <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoordY</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoordY</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
                                  </funcprototype>
                                  
                                  <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoordY</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoordY</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>xw</parameter></paramdef>
                                  </funcprototype>
                                  
                                   <funcprototype>
-                                       <funcdef>integer <function>ST_World2RasterCoordY</function></funcdef>
+                                       <funcdef>integer <function>ST_WorldToRasterCoordY</function></funcdef>
                                        <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>xw</parameter></paramdef>
                                        <paramdef><type>double precision </type> <parameter>yw</parameter></paramdef>
@@ -2888,14 +2894,15 @@ FROM dummy_rast;
                                
                                <para>Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw).  A point, or (both xw and yw world coordinates are required if a raster is skewed).  If a raster
                                        is not skewed then xw is sufficient. World coordinates are in the spatial reference coordinate system of the raster.</para>
+                               <para>Changed: 2.1.0 In prior versions, this was called ST_World2RasterCoordY</para>
                        </refsection>
                                
                        <refsection>
                                <title>Examples</title>
                        
-                               <programlisting>SELECT rid, ST_World2RasterCoordY(rast,20.5) As ycoord, 
-               ST_World2RasterCoordY(rast,3427927.8,20.5) As ycoord_xwyw, 
-               ST_World2RasterCoordY(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast))) As ptycoord
+                               <programlisting>SELECT rid, ST_WorldToRasterCoordY(rast,20.5) As ycoord, 
+               ST_WorldToRasterCoordY(rast,3427927.8,20.5) As ycoord_xwyw, 
+               ST_WorldToRasterCoordY(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast))) As ptycoord
 FROM dummy_rast;
 
  rid |  ycoord   | ycoord_xwyw | ptycoord
@@ -2908,7 +2915,7 @@ FROM dummy_rast;
                        <!-- Optionally add a "See Also" section -->
                        <refsection>
                                <title>See Also</title>
-                               <para><xref linkend="RT_ST_Raster2WorldCoordX" />, <xref linkend="RT_ST_Raster2WorldCoordY" />, <xref linkend="RT_ST_SRID" /></para>
+                               <para><xref linkend="RT_ST_RasterToWorldCoordX" />, <xref linkend="RT_ST_RasterToWorldCoordY" />, <xref linkend="RT_ST_SRID" /></para>
                        </refsection>
                </refentry>
 
index 41f9a36dfe2c07eb4ccea5693b0c7b7ff34048a7..c98f9635f4120ff45094f2f04bf295876cc65ebb 100644 (file)
@@ -3978,8 +3978,8 @@ CREATE OR REPLACE FUNCTION st_value(rast raster, band integer, pt geometry, excl
         y := st_y(pt);
         RETURN st_value(rast,
                         band,
-                        st_world2rastercoordx(rast, x, y),
-                        st_world2rastercoordy(rast, x, y),
+                        st_worldtorastercoordx(rast, x, y),
+                        st_worldtorastercoordy(rast, x, y),
                         exclude_nodata_value);
     END;
     $$
@@ -4510,10 +4510,10 @@ CREATE OR REPLACE FUNCTION st_pixelascentroid(rast raster, x integer, y integer)
 -----------------------------------------------------------------------
 
 -----------------------------------------------------------------------
--- ST_World2RasterCoord
+-- ST_WorldToRasterCoord
 -----------------------------------------------------------------------
 
-CREATE OR REPLACE FUNCTION _st_world2rastercoord(
+CREATE OR REPLACE FUNCTION _st_worldtorastercoord(
        rast raster,
        longitude double precision DEFAULT NULL, latitude double precision DEFAULT NULL,
        OUT columnx integer,
@@ -4523,26 +4523,26 @@ CREATE OR REPLACE FUNCTION _st_world2rastercoord(
        LANGUAGE 'c' IMMUTABLE;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoord(rast raster, longitude float8, latitude float8)
+-- ST_WorldToRasterCoord(rast raster, longitude float8, latitude float8)
 -- Returns the pixel column and row covering the provided X and Y world
 -- coordinates.
 -- This function works even if the world coordinates are outside the raster extent.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoord(
+CREATE OR REPLACE FUNCTION st_worldtorastercoord(
        rast raster,
        longitude double precision, latitude double precision,
        OUT columnx integer,
        OUT rowy integer
 )
-       AS $$ SELECT columnx, rowy FROM _st_world2rastercoord($1, $2, $3) $$
+       AS $$ SELECT columnx, rowy FROM _st_worldtorastercoord($1, $2, $3) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoordX(rast raster, pt geometry)
+-- ST_WorldToRasterCoordX(rast raster, pt geometry)
 -- Returns the pixel column and row covering the provided point geometry. 
 -- This function works even if the point is outside the raster extent.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoord(
+CREATE OR REPLACE FUNCTION st_worldtorastercoord(
        rast raster, pt geometry,
        OUT columnx integer,
        OUT rowy integer
@@ -4560,42 +4560,42 @@ CREATE OR REPLACE FUNCTION st_world2rastercoord(
                        RAISE EXCEPTION 'Raster and geometry do not have the same SRID';
                END IF;
 
-               SELECT rc.columnx AS x, rc.rowy AS y INTO columnx, rowy FROM _st_world2rastercoord($1, st_x(pt), st_y(pt)) AS rc;
+               SELECT rc.columnx AS x, rc.rowy AS y INTO columnx, rowy FROM _st_worldtorastercoord($1, st_x(pt), st_y(pt)) AS rc;
                RETURN;
        END;
        $$
        LANGUAGE 'plpgsql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoordX(rast raster, xw float8, yw float8)
+-- ST_WorldToRasterCoordX(rast raster, xw float8, yw float8)
 -- Returns the column number of the pixel covering the provided X and Y world
 -- coordinates.
 -- This function works even if the world coordinates are outside the raster extent.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoordx(rast raster, xw float8, yw float8)
+CREATE OR REPLACE FUNCTION st_worldtorastercoordx(rast raster, xw float8, yw float8)
        RETURNS int
-       AS $$ SELECT columnx FROM _st_world2rastercoord($1, $2, $3) $$
+       AS $$ SELECT columnx FROM _st_worldtorastercoord($1, $2, $3) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoordX(rast raster, xw float8)
+-- ST_WorldToRasterCoordX(rast raster, xw float8)
 -- Returns the column number of the pixels covering the provided world X coordinate
 -- for a non-rotated raster.
 -- This function works even if the world coordinate is outside the raster extent.
 -- This function returns an error if the raster is rotated. In this case you must
 -- also provide a Y.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoordx(rast raster, xw float8)
+CREATE OR REPLACE FUNCTION st_worldtorastercoordx(rast raster, xw float8)
        RETURNS int
-       AS $$ SELECT columnx FROM _st_world2rastercoord($1, $2, NULL) $$
+       AS $$ SELECT columnx FROM _st_worldtorastercoord($1, $2, NULL) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoordX(rast raster, pt geometry)
+-- ST_WorldToRasterCoordX(rast raster, pt geometry)
 -- Returns the column number of the pixel covering the provided point geometry.
 -- This function works even if the point is outside the raster extent.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoordx(rast raster, pt geometry)
+CREATE OR REPLACE FUNCTION st_worldtorastercoordx(rast raster, pt geometry)
        RETURNS int AS
        $$
        DECLARE
@@ -4607,42 +4607,42 @@ CREATE OR REPLACE FUNCTION st_world2rastercoordx(rast raster, pt geometry)
                IF ST_SRID(rast) != ST_SRID(pt) THEN
                        RAISE EXCEPTION 'Raster and geometry do not have the same SRID';
                END IF;
-               SELECT columnx INTO xr FROM _st_world2rastercoord($1, st_x(pt), st_y(pt));
+               SELECT columnx INTO xr FROM _st_worldtorastercoord($1, st_x(pt), st_y(pt));
                RETURN xr;
        END;
        $$
        LANGUAGE 'plpgsql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoordY(rast raster, xw float8, yw float8)
+-- ST_WorldToRasterCoordY(rast raster, xw float8, yw float8)
 -- Returns the row number of the pixel covering the provided X and Y world
 -- coordinates.
 -- This function works even if the world coordinates are outside the raster extent.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoordy(rast raster, xw float8, yw float8)
+CREATE OR REPLACE FUNCTION st_worldtorastercoordy(rast raster, xw float8, yw float8)
        RETURNS int
-       AS $$ SELECT rowy FROM _st_world2rastercoord($1, $2, $3) $$
+       AS $$ SELECT rowy FROM _st_worldtorastercoord($1, $2, $3) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoordY(rast raster, yw float8)
+-- ST_WorldToRasterCoordY(rast raster, yw float8)
 -- Returns the row number of the pixels covering the provided world Y coordinate
 -- for a non-rotated raster.
 -- This function works even if the world coordinate is outside the raster extent.
 -- This function returns an error if the raster is rotated. In this case you must
 -- also provide an X.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoordy(rast raster, yw float8)
+CREATE OR REPLACE FUNCTION st_worldtorastercoordy(rast raster, yw float8)
        RETURNS int
-       AS $$ SELECT rowy FROM _st_world2rastercoord($1, NULL, $2) $$
+       AS $$ SELECT rowy FROM _st_worldtorastercoord($1, NULL, $2) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_World2RasterCoordY(rast raster, pt geometry)
+-- ST_WorldToRasterCoordY(rast raster, pt geometry)
 -- Returns the row number of the pixel covering the provided point geometry.
 -- This function works even if the point is outside the raster extent.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_world2rastercoordy(rast raster, pt geometry)
+CREATE OR REPLACE FUNCTION st_worldtorastercoordy(rast raster, pt geometry)
        RETURNS int AS
        $$
        DECLARE
@@ -4654,17 +4654,17 @@ CREATE OR REPLACE FUNCTION st_world2rastercoordy(rast raster, pt geometry)
                IF ST_SRID(rast) != ST_SRID(pt) THEN
                        RAISE EXCEPTION 'Raster and geometry do not have the same SRID';
                END IF;
-               SELECT rowy INTO yr FROM _st_world2rastercoord($1, st_x(pt), st_y(pt));
+               SELECT rowy INTO yr FROM _st_worldtorastercoord($1, st_x(pt), st_y(pt));
                RETURN yr;
        END;
        $$
        LANGUAGE 'plpgsql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_Raster2WorldCoord
+-- ST_RasterToWorldCoord
 ---------------------------------------------------------------------------------
 
-CREATE OR REPLACE FUNCTION _st_raster2worldcoord(
+CREATE OR REPLACE FUNCTION _st_rastertoworldcoord(
        rast raster,
        columnx integer DEFAULT NULL, rowy integer DEFAULT NULL,
        OUT longitude double precision,
@@ -4674,35 +4674,35 @@ CREATE OR REPLACE FUNCTION _st_raster2worldcoord(
        LANGUAGE 'c' IMMUTABLE;
 
 ---------------------------------------------------------------------------------
--- ST_Raster2WorldCoordX(rast raster, xr int, yr int)
+-- ST_RasterToWorldCoordX(rast raster, xr int, yr int)
 -- Returns the longitude and latitude of the upper left corner of the pixel
 -- located at the provided pixel column and row.
 -- This function works even if the provided raster column and row are beyond or
 -- below the raster width and height.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_raster2worldcoord(
+CREATE OR REPLACE FUNCTION st_rastertoworldcoord(
        rast raster,
        columnx integer, rowy integer,
        OUT longitude double precision,
        OUT latitude double precision
 )
-       AS $$ SELECT longitude, latitude FROM _st_raster2worldcoord($1, $2, $3) $$
+       AS $$ SELECT longitude, latitude FROM _st_rastertoworldcoord($1, $2, $3) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_Raster2WorldCoordX(rast raster, xr int, yr int)
+-- ST_RasterToWorldCoordX(rast raster, xr int, yr int)
 -- Returns the X world coordinate of the upper left corner of the pixel located at
 -- the provided column and row numbers.
 -- This function works even if the provided raster column and row are beyond or
 -- below the raster width and height.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_raster2worldcoordx(rast raster, xr int, yr int)
+CREATE OR REPLACE FUNCTION st_rastertoworldcoordx(rast raster, xr int, yr int)
        RETURNS float8
-       AS $$ SELECT longitude FROM _st_raster2worldcoord($1, $2, $3) $$
+       AS $$ SELECT longitude FROM _st_rastertoworldcoord($1, $2, $3) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_Raster2WorldCoordX(rast raster, xr int)
+-- ST_RasterToWorldCoordX(rast raster, xr int)
 -- Returns the X world coordinate of the upper left corner of the pixel located at
 -- the provided column number for a non-rotated raster.
 -- This function works even if the provided raster column is beyond or below the
@@ -4710,25 +4710,25 @@ CREATE OR REPLACE FUNCTION st_raster2worldcoordx(rast raster, xr int, yr int)
 -- This function returns an error if the raster is rotated. In this case you must
 -- also provide a Y.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_raster2worldcoordx(rast raster, xr int)
+CREATE OR REPLACE FUNCTION st_rastertoworldcoordx(rast raster, xr int)
        RETURNS float8
-       AS $$ SELECT longitude FROM _st_raster2worldcoord($1, $2, NULL) $$
+       AS $$ SELECT longitude FROM _st_rastertoworldcoord($1, $2, NULL) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_Raster2WorldCoordY(rast raster, xr int, yr int)
+-- ST_RasterToWorldCoordY(rast raster, xr int, yr int)
 -- Returns the Y world coordinate of the upper left corner of the pixel located at
 -- the provided column and row numbers.
 -- This function works even if the provided raster column and row are beyond or
 -- below the raster width and height.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_raster2worldcoordy(rast raster, xr int, yr int)
+CREATE OR REPLACE FUNCTION st_rastertoworldcoordy(rast raster, xr int, yr int)
        RETURNS float8
-       AS $$ SELECT latitude FROM _st_raster2worldcoord($1, $2, $3) $$
+       AS $$ SELECT latitude FROM _st_rastertoworldcoord($1, $2, $3) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 ---------------------------------------------------------------------------------
--- ST_Raster2WorldCoordY(rast raster, yr int)
+-- ST_RasterToWorldCoordY(rast raster, yr int)
 -- Returns the Y world coordinate of the upper left corner of the pixel located at
 -- the provided row number for a non-rotated raster.
 -- This function works even if the provided raster row is beyond or below the
@@ -4736,9 +4736,9 @@ CREATE OR REPLACE FUNCTION st_raster2worldcoordy(rast raster, xr int, yr int)
 -- This function returns an error if the raster is rotated. In this case you must
 -- also provide an X.
 ---------------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_raster2worldcoordy(rast raster, yr int)
+CREATE OR REPLACE FUNCTION st_rastertoworldcoordy(rast raster, yr int)
        RETURNS float8
-       AS $$ SELECT latitude FROM _st_raster2worldcoord($1, NULL, $2) $$
+       AS $$ SELECT latitude FROM _st_rastertoworldcoord($1, NULL, $2) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -----------------------------------------------------------------------
@@ -5161,14 +5161,14 @@ CREATE OR REPLACE FUNCTION _st_intersects(geom geometry, rast raster, nband inte
 --RAISE NOTICE 'x1w=%, y1w=%, x2w=%, y2w=%', x1w, y1w, x2w, y2w;
 
                -- Convert world coordinates to raster coordinates
-               x1 := st_world2rastercoordx(rast, x1w, y1w);
-               y1 := st_world2rastercoordy(rast, x1w, y1w);
-               x2 := st_world2rastercoordx(rast, x2w, y1w);
-               y2 := st_world2rastercoordy(rast, x2w, y1w);
-               x3 := st_world2rastercoordx(rast, x1w, y2w);
-               y3 := st_world2rastercoordy(rast, x1w, y2w);
-               x4 := st_world2rastercoordx(rast, x2w, y2w);
-               y4 := st_world2rastercoordy(rast, x2w, y2w);
+               x1 := st_worldtorastercoordx(rast, x1w, y1w);
+               y1 := st_worldtorastercoordy(rast, x1w, y1w);
+               x2 := st_worldtorastercoordx(rast, x2w, y1w);
+               y2 := st_worldtorastercoordy(rast, x2w, y1w);
+               x3 := st_worldtorastercoordx(rast, x1w, y2w);
+               y3 := st_worldtorastercoordy(rast, x1w, y2w);
+               x4 := st_worldtorastercoordx(rast, x2w, y2w);
+               y4 := st_worldtorastercoordy(rast, x2w, y2w);
 
 --RAISE NOTICE 'x1=%, y1=%, x2=%, y2=%, x3=%, y3=%, x4=%, y4=%', x1, y1, x2, y2, x3, y3, x4, y4;
 
@@ -5774,7 +5774,7 @@ CREATE OR REPLACE FUNCTION st_nearestvalue(
        exclude_nodata_value boolean DEFAULT TRUE
 )
        RETURNS double precision
-       AS $$ SELECT st_nearestvalue($1, $2, st_setsrid(st_makepoint(st_raster2worldcoordx($1, $3, $4), st_raster2worldcoordy($1, $3, $4)), st_srid($1)), $5) $$
+       AS $$ SELECT st_nearestvalue($1, $2, st_setsrid(st_makepoint(st_rastertoworldcoordx($1, $3, $4), st_rastertoworldcoordy($1, $3, $4)), st_srid($1)), $5) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 CREATE OR REPLACE FUNCTION st_nearestvalue(
@@ -5783,7 +5783,7 @@ CREATE OR REPLACE FUNCTION st_nearestvalue(
        exclude_nodata_value boolean DEFAULT TRUE
 )
        RETURNS double precision
-       AS $$ SELECT st_nearestvalue($1, 1, st_setsrid(st_makepoint(st_raster2worldcoordx($1, $2, $3), st_raster2worldcoordy($1, $2, $3)), st_srid($1)), $4) $$
+       AS $$ SELECT st_nearestvalue($1, 1, st_setsrid(st_makepoint(st_rastertoworldcoordx($1, $2, $3), st_rastertoworldcoordy($1, $2, $3)), st_srid($1)), $4) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -----------------------------------------------------------------------
@@ -5846,8 +5846,8 @@ CREATE OR REPLACE FUNCTION st_neighborhood(
 
                SELECT _st_neighborhood(
                        $1, $2,
-                       st_world2rastercoordx(rast, wx, wy),
-                       st_world2rastercoordy(rast, wx, wy),
+                       st_worldtorastercoordx(rast, wx, wy),
+                       st_worldtorastercoordy(rast, wx, wy),
                        $4, $5,
                        $6
                ) INTO rtn;
index ef8d56d7df821b8015e4c825caef984386e85d5f..9facaa34e5f17d18ca86b4d7f2bcc262582624c8 100644 (file)
@@ -356,8 +356,8 @@ DROP FUNCTION IF EXISTS st_intersects(raster, integer, raster, integer);
 DROP FUNCTION IF EXISTS st_intersects(raster, raster);
 
 -- functions have changed dramatically
-DROP FUNCTION IF EXISTS st_intersection(rast raster, band integer, geom geometry);
-DROP FUNCTION IF EXISTS st_intersection(rast raster, geom geometry);
+DROP FUNCTION IF EXISTS st_intersection(raster, integer, geometry);
+DROP FUNCTION IF EXISTS st_intersection(raster, geometry);
 
 -- function was renamed
 DROP FUNCTION IF EXISTS st_minpossibleval(text);
@@ -450,3 +450,20 @@ DROP FUNCTION IF EXISTS st_tile(raster, integer, integer, integer);
 -- function signatures changed
 DROP FUNCTION IF EXISTS st_setvalue(raster, integer, geometry, double precision);
 DROP FUNCTION IF EXISTS st_setvalue(raster, geometry, double precision);
+
+-- function name change
+DROP FUNCTION IF EXISTS st_world2rastercoord(raster, double precision, double precision);
+DROP FUNCTION IF EXISTS st_world2rastercoord(raster, geometry);
+DROP FUNCTION IF EXISTS _st_world2rastercoord(raster, double precision, double precision);
+DROP FUNCTION IF EXISTS st_world2rastercoordx(raster, float8, float8);
+DROP FUNCTION IF EXISTS st_world2rastercoordx(raster, float8);
+DROP FUNCTION IF EXISTS st_world2rastercoordx(raster, geometry);
+DROP FUNCTION IF EXISTS st_world2rastercoordy(raster, float8, float8);
+DROP FUNCTION IF EXISTS st_world2rastercoordy(raster, float8);
+DROP FUNCTION IF EXISTS st_world2rastercoordy(raster, geometry);
+DROP FUNCTION IF EXISTS st_raster2worldcoord( raster, integer, integer);
+DROP FUNCTION IF EXISTS _st_raster2worldcoord(raster, integer, integer);
+DROP FUNCTION IF EXISTS st_raster2worldcoordx(raster, int, int);
+DROP FUNCTION IF EXISTS st_raster2worldcoordx(raster, int);
+DROP FUNCTION IF EXISTS st_raster2worldcoordy(raster, int, int);
+DROP FUNCTION IF EXISTS st_raster2worldcoordy(raster, int);
index 94074c595d5ec7bab45f79c576896aa2cc85b4a9..0fec54de38c50d5bf4d5a9bc60a8a2cd0adde616 100644 (file)
@@ -57,8 +57,8 @@ TEST_PROPS = \
        rt_isempty \
        rt_hasnoband \
        rt_metadata \
-       rt_raster2worldcoord \
-       rt_world2rastercoord
+       rt_rastertoworldcoord \
+       rt_worldtorastercoord
 
 TEST_BANDPROPS = \
        rt_band_properties \
index f550e95e9c2b3bf48e30aee726bb22b6d1490563..c8065f2bcaf48a414c36f8a2f10f1f5bb3ba43e2 100644 (file)
@@ -34,8 +34,8 @@ DROP FUNCTION make_test_raster();
 SELECT
        (pix).x,
        (pix).y,
-       ST_Raster2WorldCoordX(rast, (pix).x, (pix).y),
-       ST_Raster2WorldCoordY(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordX(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordY(rast, (pix).x, (pix).y),
        (pix).val,
        ST_AsText((pix).geom)
 FROM (SELECT rast, ST_PixelAsCentroids(rast) AS pix FROM raster_pixelascentroids) foo
@@ -44,8 +44,8 @@ ORDER BY 1, 2, 3, 4, 6;
 SELECT
        (pix).x,
        (pix).y,
-       ST_Raster2WorldCoordX(rast, (pix).x, (pix).y),
-       ST_Raster2WorldCoordY(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordX(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordY(rast, (pix).x, (pix).y),
        (pix).val,
        ST_AsText((pix).geom)
 FROM (SELECT rast, ST_PixelAsCentroids(rast, NULL) AS pix FROM raster_pixelascentroids) foo
@@ -54,8 +54,8 @@ ORDER BY 1, 2, 3, 4, 6;
 SELECT
        (pix).x,
        (pix).y,
-       ST_Raster2WorldCoordX(rast, (pix).x, (pix).y),
-       ST_Raster2WorldCoordY(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordX(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordY(rast, (pix).x, (pix).y),
        (pix).val,
        ST_AsText((pix).geom)
 FROM (SELECT rast, ST_PixelAsCentroids(rast, 1, FALSE) AS pix FROM raster_pixelascentroids) foo
index 8a73f80981a428408a9ee72c1772961dec12a05a..6faf1f0b777f5e7506a9b6878f9a96c2301ce3ec 100644 (file)
@@ -34,8 +34,8 @@ DROP FUNCTION make_test_raster();
 SELECT
        (pix).x,
        (pix).y,
-       ST_Raster2WorldCoordX(rast, (pix).x, (pix).y),
-       ST_Raster2WorldCoordY(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordX(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordY(rast, (pix).x, (pix).y),
        (pix).val,
        ST_AsText((pix).geom)
 FROM (SELECT rast, ST_PixelAsPoints(rast) AS pix FROM raster_pixelaspoints) foo
@@ -44,8 +44,8 @@ ORDER BY 1, 2, 3, 4, 6;
 SELECT
        (pix).x,
        (pix).y,
-       ST_Raster2WorldCoordX(rast, (pix).x, (pix).y),
-       ST_Raster2WorldCoordY(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordX(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordY(rast, (pix).x, (pix).y),
        (pix).val,
        ST_AsText((pix).geom)
 FROM (SELECT rast, ST_PixelAsPoints(rast, NULL) AS pix FROM raster_pixelaspoints) foo
@@ -54,8 +54,8 @@ ORDER BY 1, 2, 3, 4, 6;
 SELECT
        (pix).x,
        (pix).y,
-       ST_Raster2WorldCoordX(rast, (pix).x, (pix).y),
-       ST_Raster2WorldCoordY(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordX(rast, (pix).x, (pix).y),
+       ST_RasterToWorldCoordY(rast, (pix).x, (pix).y),
        (pix).val,
        ST_AsText((pix).geom)
 FROM (SELECT rast, ST_PixelAsPoints(rast, 1, FALSE) AS pix FROM raster_pixelaspoints) foo
similarity index 72%
rename from raster/test/regress/rt_raster2worldcoord.sql
rename to raster/test/regress/rt_rastertoworldcoord.sql
index 590614295242ef61ac5bc6db163e21044e9cde46..91e26d2048624dae95d441268b4dba5d0cbeedb3 100644 (file)
@@ -47,107 +47,107 @@ DROP FUNCTION make_test_raster(integer, integer, integer, double precision, doub
 
 SELECT
        rid,
-       (ST_Raster2WorldCoord(rast, 1, 1)).*
+       (ST_RasterToWorldCoord(rast, 1, 1)).*
 FROM raster_raster2world;
 SELECT
        rid,
-       (ST_Raster2WorldCoord(rast, 1, 2)).*
+       (ST_RasterToWorldCoord(rast, 1, 2)).*
 FROM raster_raster2world;
 SELECT
        rid,
-       (ST_Raster2WorldCoord(rast, 2, 2)).*
+       (ST_RasterToWorldCoord(rast, 2, 2)).*
 FROM raster_raster2world;
 SELECT
        rid,
-       (ST_Raster2WorldCoord(rast, 0, 0)).*
+       (ST_RasterToWorldCoord(rast, 0, 0)).*
 FROM raster_raster2world;
 SELECT
        rid,
-       (ST_Raster2WorldCoord(rast, -1, 0)).*
+       (ST_RasterToWorldCoord(rast, -1, 0)).*
 FROM raster_raster2world;
 
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 1, 1)
+       ST_RasterToWorldCoordX(rast, 1, 1)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 1, 2)
+       ST_RasterToWorldCoordX(rast, 1, 2)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 2, 2)
+       ST_RasterToWorldCoordX(rast, 2, 2)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 0, 0)
+       ST_RasterToWorldCoordX(rast, 0, 0)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, -1, 0)
+       ST_RasterToWorldCoordX(rast, -1, 0)
 FROM raster_raster2world;
 
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 1)
+       ST_RasterToWorldCoordX(rast, 1)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 1)
+       ST_RasterToWorldCoordX(rast, 1)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 2)
+       ST_RasterToWorldCoordX(rast, 2)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, 0)
+       ST_RasterToWorldCoordX(rast, 0)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordX(rast, -1)
+       ST_RasterToWorldCoordX(rast, -1)
 FROM raster_raster2world;
 
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 1, 1)
+       ST_RasterToWorldCoordY(rast, 1, 1)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 1, 2)
+       ST_RasterToWorldCoordY(rast, 1, 2)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 2, 2)
+       ST_RasterToWorldCoordY(rast, 2, 2)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 0, 0)
+       ST_RasterToWorldCoordY(rast, 0, 0)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, -1, 0)
+       ST_RasterToWorldCoordY(rast, -1, 0)
 FROM raster_raster2world;
 
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 1)
+       ST_RasterToWorldCoordY(rast, 1)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 1)
+       ST_RasterToWorldCoordY(rast, 1)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 2)
+       ST_RasterToWorldCoordY(rast, 2)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, 0)
+       ST_RasterToWorldCoordY(rast, 0)
 FROM raster_raster2world;
 SELECT
        rid,
-       ST_Raster2WorldCoordY(rast, -1)
+       ST_RasterToWorldCoordY(rast, -1)
 FROM raster_raster2world;
 
 DROP TABLE raster_raster2world;
index 2b5142f8fc961fb2835d6155366c69aaa862092d..813822d3b5084179e044fadf794d4ffb67f1ccce 100644 (file)
@@ -147,68 +147,68 @@ VALUES ( 4, '6000x6000, ip:-75.5533328537098,49.2824585505576 scale:0.0008059652
 );
 
 -----------------------------------------------------------------------
--- Test 1 - st_world2rastercoordx(rast raster, xw float8, yw float8) 
+-- Test 1 - ST_WorldTorastercoordx(rast raster, xw float8, yw float8) 
 -----------------------------------------------------------------------
 
 SELECT 'test 1.1', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordx(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordx(rast, 
                                 ipx, 
                                 ipy
                                ), 0) != 1;
 
 SELECT 'test 1.2', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordx(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordx(rast, 
                                 scalex * (width - 1) + skewx * (height - 1) + ipx, 
                                 skewy * (width - 1) + scaley * (height - 1) + ipy
                                ), 0) != width;
 
 SELECT 'test 1.3', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordx(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordx(rast, 
                                 scalex * width + skewx * height + ipx, 
                                 skewy * width + scaley * height + ipy
                                ), 0) != width + 1;
 
 -----------------------------------------------------------------------
--- Test 2 - st_world2rastercoordx(rast raster, xw float8) 
+-- Test 2 - ST_WorldTorastercoordx(rast raster, xw float8) 
 -----------------------------------------------------------------------
 
 SELECT 'test 2.1', id, name
     FROM rt_utility_test
     WHERE skewx = 0 and 
-          COALESCE(st_world2rastercoordx(rast, 
+          COALESCE(ST_WorldTorastercoordx(rast, 
                                 ipx
                                ), 0) != 1;
 
 SELECT 'test 2.2', id, name
     FROM rt_utility_test
     WHERE skewx = 0 and 
-          COALESCE(st_world2rastercoordx(rast, 
+          COALESCE(ST_WorldTorastercoordx(rast, 
                                 scalex * (width - 1) + ipx
                                ), 0) != width;
 
 SELECT 'test 2.3', id, name
     FROM rt_utility_test
     WHERE skewx = 0 and 
-          COALESCE(st_world2rastercoordx(rast, 
+          COALESCE(ST_WorldTorastercoordx(rast, 
                                 scalex * width + ipx
                                ), 0) != width + 1;
 
 SELECT 'test 2.4', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordx(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordx(rast, 
                                 ipx
                                ), 0) != 1;
 
 -----------------------------------------------------------------------
--- Test 3 - st_world2rastercoordx(rast raster, pt geometry) 
+-- Test 3 - ST_WorldTorastercoordx(rast raster, pt geometry) 
 -----------------------------------------------------------------------
 
 SELECT 'test 3.1', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordx(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordx(rast, 
                                 st_makepoint(
                                              ipx, 
                                              ipy
@@ -217,7 +217,7 @@ SELECT 'test 3.1', id, name
 
 SELECT 'test 3.2', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordx(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordx(rast, 
                                 st_makepoint(
                                              scalex * (width - 1) + skewx * (height - 1) + ipx, 
                                              skewy * (width - 1) + scaley * (height - 1) + ipy
@@ -226,7 +226,7 @@ SELECT 'test 3.2', id, name
 
 SELECT 'test 3.3', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordx(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordx(rast, 
                                 st_makepoint(
                                              scalex * width + skewx * height + ipx, 
                                              skewy * width + scaley * height + ipy
@@ -234,69 +234,69 @@ SELECT 'test 3.3', id, name
                                ), 0) != width + 1;
 
 -----------------------------------------------------------------------
--- Test 4 - st_world2rastercoordy(rast raster, xw float8, yw float8) 
+-- Test 4 - ST_WorldTorastercoordy(rast raster, xw float8, yw float8) 
 -----------------------------------------------------------------------
 
 SELECT 'test 4.1', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordy(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordy(rast, 
                                 ipx, 
                                 ipy
                                ), 0) != 1;
 
 SELECT 'test 4.2', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordy(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordy(rast, 
                                 scalex * (width - 1) + skewx * (height - 1) + ipx, 
                                 skewy * (width - 1) + scaley * (height - 1) + ipy
                                ), 0) != height;
 
 SELECT 'test 4.3', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordy(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordy(rast, 
                                 scalex * width + skewx * height + ipx, 
                                 skewy * width + scaley * height + ipy
                                ), 0) != height + 1;
 
 -----------------------------------------------------------------------
--- Test 5 - st_world2rastercoordy(rast raster, yw float8) 
+-- Test 5 - ST_WorldTorastercoordy(rast raster, yw float8) 
 -----------------------------------------------------------------------
 
 SELECT 'test 5.1', id, name
     FROM rt_utility_test
     WHERE skewy = 0 and 
-          COALESCE(st_world2rastercoordy(rast, 
+          COALESCE(ST_WorldTorastercoordy(rast, 
                                 ipy
                                ), 0) != 1;
 
 SELECT 'test 5.2', id, name
     FROM rt_utility_test
     WHERE skewy = 0 and 
-          COALESCE(st_world2rastercoordy(rast, 
+          COALESCE(ST_WorldTorastercoordy(rast, 
                                 scaley * (height - 1) + ipy
                                ), 0) != height;
 
 SELECT 'test 5.3', id, name
     FROM rt_utility_test
     WHERE skewy = 0 and 
-          COALESCE(st_world2rastercoordy(rast, 
+          COALESCE(ST_WorldTorastercoordy(rast, 
                                 scaley * height + ipy
                                ), 0) != height + 1;
 
 SELECT 'test 5.4', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordy(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordy(rast, 
                                 ipy
                                ), 0) != 1;
 
 
 -----------------------------------------------------------------------
--- Test 6 - st_world2rastercoordy(rast raster, pt geometry) 
+-- Test 6 - ST_WorldTorastercoordy(rast raster, pt geometry) 
 -----------------------------------------------------------------------
 
 SELECT 'test 6.1', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordy(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordy(rast, 
                                 st_makepoint(
                                              ipx, 
                                              ipy
@@ -305,7 +305,7 @@ SELECT 'test 6.1', id, name
 
 SELECT 'test 6.2', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordy(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordy(rast, 
                                 st_makepoint(
                                              scalex * (width - 1) + skewx * (height - 1) + ipx, 
                                              skewy * (width - 1) + scaley * (height - 1) + ipy
@@ -314,7 +314,7 @@ SELECT 'test 6.2', id, name
 
 SELECT 'test 6.3', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_world2rastercoordy(rast, 
+    WHERE COALESCE(ST_WorldTorastercoordy(rast, 
                                 st_makepoint(
                                              scalex * width + skewx * height + ipx, 
                                              skewy * width + scaley * height + ipy
@@ -322,60 +322,60 @@ SELECT 'test 6.3', id, name
                                ), 0) != height + 1;
 
 -----------------------------------------------------------------------
--- Test 7 - st_raster2worldcoordx(rast raster, xr int, yr int)
+-- Test 7 - ST_RasterToworldcoordx(rast raster, xr int, yr int)
 -----------------------------------------------------------------------
 
 SELECT 'test 7.1', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_raster2worldcoordx(rast, 1, 1), 0)::numeric != ipx::numeric;
+    WHERE COALESCE(ST_RasterToworldcoordx(rast, 1, 1), 0)::numeric != ipx::numeric;
     
 SELECT 'test 7.2', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_raster2worldcoordx(rast, width, height), 0)::numeric != (scalex * (width - 1) + skewx * (height - 1) + ipx)::numeric;
+    WHERE COALESCE(ST_RasterToworldcoordx(rast, width, height), 0)::numeric != (scalex * (width - 1) + skewx * (height - 1) + ipx)::numeric;
 
 -----------------------------------------------------------------------
--- Test 8 - st_raster2worldcoordx(rast raster, xr int)
+-- Test 8 - ST_RasterToworldcoordx(rast raster, xr int)
 -----------------------------------------------------------------------
 
 SELECT 'test 8.1', id, name
     FROM rt_utility_test
-    WHERE skewx = 0 and COALESCE(st_raster2worldcoordx(rast, 1), 0)::numeric != ipx::numeric;
+    WHERE skewx = 0 and COALESCE(ST_RasterToworldcoordx(rast, 1), 0)::numeric != ipx::numeric;
     
 SELECT 'test 8.2', id, name
     FROM rt_utility_test
-    WHERE skewx = 0 and COALESCE(st_raster2worldcoordx(rast, width), 0)::numeric != (scalex * (width - 1) + ipx)::numeric;
+    WHERE skewx = 0 and COALESCE(ST_RasterToworldcoordx(rast, width), 0)::numeric != (scalex * (width - 1) + ipx)::numeric;
 
 SELECT 'test 8.3', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_raster2worldcoordx(rast, 1), 0)::numeric != ipx::numeric;
+    WHERE COALESCE(ST_RasterToworldcoordx(rast, 1), 0)::numeric != ipx::numeric;
  
 -----------------------------------------------------------------------
--- Test 9 - st_raster2worldcoordy(rast raster, xr int, yr int)
+-- Test 9 - ST_RasterToworldcoordy(rast raster, xr int, yr int)
 -----------------------------------------------------------------------
 
 SELECT 'test 9.1', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_raster2worldcoordy(rast, 1, 1), 0)::numeric != ipy::numeric;
+    WHERE COALESCE(ST_RasterToworldcoordy(rast, 1, 1), 0)::numeric != ipy::numeric;
     
 SELECT 'test 9.2', id, name
     FROM rt_utility_test
-    WHERE round(COALESCE(st_raster2worldcoordy(rast, width, height), 0)::numeric, 10) != round((skewy * (width - 1) + scaley * (height - 1) + ipy)::numeric, 10);
+    WHERE round(COALESCE(ST_RasterToworldcoordy(rast, width, height), 0)::numeric, 10) != round((skewy * (width - 1) + scaley * (height - 1) + ipy)::numeric, 10);
 
 -----------------------------------------------------------------------
--- Test 10 - st_raster2worldcoordy(rast raster, yr int) 
+-- Test 10 - ST_RasterToworldcoordy(rast raster, yr int) 
 -----------------------------------------------------------------------
 
 SELECT 'test 10.1', id, name
     FROM rt_utility_test
-    WHERE skewy = 0 and COALESCE(st_raster2worldcoordy(rast, 1, 1), 0)::numeric != ipy::numeric;
+    WHERE skewy = 0 and COALESCE(ST_RasterToworldcoordy(rast, 1, 1), 0)::numeric != ipy::numeric;
     
 SELECT 'test 10.2', id, name
     FROM rt_utility_test
-    WHERE skewy = 0 and COALESCE(st_raster2worldcoordy(rast, width, height), 0)::numeric != (scaley * (height - 1) + ipy)::numeric;
+    WHERE skewy = 0 and COALESCE(ST_RasterToworldcoordy(rast, width, height), 0)::numeric != (scaley * (height - 1) + ipy)::numeric;
 
 SELECT 'test 10.3', id, name
     FROM rt_utility_test
-    WHERE COALESCE(st_raster2worldcoordy(rast, 1), 0)::numeric != ipy::numeric;
+    WHERE COALESCE(ST_RasterToworldcoordy(rast, 1), 0)::numeric != ipy::numeric;
     
 -----------------------------------------------------------------------
 -- Test 11 - st_minpossiblevalue(pixtype text)
similarity index 67%
rename from raster/test/regress/rt_world2rastercoord.sql
rename to raster/test/regress/rt_worldtorastercoord.sql
index 75466192e85bdf3d2a774e7ba5f38240c627b932..38b1679aa99dd7e08e00301176e0ab76a0688f20 100644 (file)
@@ -47,138 +47,138 @@ DROP FUNCTION make_test_raster(integer, integer, integer, double precision, doub
 
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, -2, -2)).*
+       (ST_WorldToRasterCoord(rast, -2, -2)).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, 0, 0)).*
+       (ST_WorldToRasterCoord(rast, 0, 0)).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, 1, -1)).*
+       (ST_WorldToRasterCoord(rast, 1, -1)).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, 1, 1)).*
+       (ST_WorldToRasterCoord(rast, 1, 1)).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, 2, 2)).*
+       (ST_WorldToRasterCoord(rast, 2, 2)).*
 FROM raster_world2raster;
 
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, ST_MakePoint(-2, -2))).*
+       (ST_WorldToRasterCoord(rast, ST_MakePoint(-2, -2))).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, ST_MakePoint(0, 0))).*
+       (ST_WorldToRasterCoord(rast, ST_MakePoint(0, 0))).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, ST_MakePoint(1, -1))).*
+       (ST_WorldToRasterCoord(rast, ST_MakePoint(1, -1))).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, ST_MakePoint(1, 1))).*
+       (ST_WorldToRasterCoord(rast, ST_MakePoint(1, 1))).*
 FROM raster_world2raster;
 SELECT
        rid,
-       (ST_World2RasterCoord(rast, ST_MakePoint(2, 2))).*
+       (ST_WorldToRasterCoord(rast, ST_MakePoint(2, 2))).*
 FROM raster_world2raster;
 
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, -2, -2)
+       ST_WorldToRasterCoordX(rast, -2, -2)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 0, 0)
+       ST_WorldToRasterCoordX(rast, 0, 0)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 1, -1)
+       ST_WorldToRasterCoordX(rast, 1, -1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 1, 1)
+       ST_WorldToRasterCoordX(rast, 1, 1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 2, 2)
+       ST_WorldToRasterCoordX(rast, 2, 2)
 FROM raster_world2raster;
 
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, ST_MakePoint(-2, -2))
+       ST_WorldToRasterCoordX(rast, ST_MakePoint(-2, -2))
 FROM raster_world2raster;
 
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, -2)
+       ST_WorldToRasterCoordX(rast, -2)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 0)
+       ST_WorldToRasterCoordX(rast, 0)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 1)
+       ST_WorldToRasterCoordX(rast, 1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 1)
+       ST_WorldToRasterCoordX(rast, 1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, 2)
+       ST_WorldToRasterCoordX(rast, 2)
 FROM raster_world2raster;
 
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, -2, -2)
+       ST_WorldToRasterCoordY(rast, -2, -2)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 0, 0)
+       ST_WorldToRasterCoordY(rast, 0, 0)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 1, -1)
+       ST_WorldToRasterCoordY(rast, 1, -1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 1, 1)
+       ST_WorldToRasterCoordY(rast, 1, 1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 2, 2)
+       ST_WorldToRasterCoordY(rast, 2, 2)
 FROM raster_world2raster;
 
 SELECT
        rid,
-       ST_World2RasterCoordX(rast, ST_MakePoint(-2, -2))
+       ST_WorldToRasterCoordX(rast, ST_MakePoint(-2, -2))
 FROM raster_world2raster;
 
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, -2)
+       ST_WorldToRasterCoordY(rast, -2)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 0)
+       ST_WorldToRasterCoordY(rast, 0)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 1)
+       ST_WorldToRasterCoordY(rast, 1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 1)
+       ST_WorldToRasterCoordY(rast, 1)
 FROM raster_world2raster;
 SELECT
        rid,
-       ST_World2RasterCoordY(rast, 2)
+       ST_WorldToRasterCoordY(rast, 2)
 FROM raster_world2raster;
 
 DROP TABLE raster_world2raster;