]> granicus.if.org Git - postgis/commitdiff
ST_Force_XXX renamed to ST_ForceXXX
authorSandro Santilli <strk@keybit.net>
Fri, 10 May 2013 15:00:38 +0000 (15:00 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 10 May 2013 15:00:38 +0000 (15:00 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11406 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
doc/performance_tips.xml
doc/reference_editor.xml
postgis/postgis.sql.in
regress/binary.sql
regress/lwgeom_regress.sql
regress/regress.sql
regress/tickets.sql
regress/typmod.sql
regress/wmsservers.sql

diff --git a/NEWS b/NEWS
index a4e94e32339fde0102c6809e7c8950a688ac6f1b..9ef976c1047a8af0215cef52b8f60e7ef7b6ff1f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ PostGIS 2.1.0
   - ST_Line_Interpolate_Point renamed to ST_LineInterpolatePoint
   - ST_Line_Substring renamed to ST_LineSubstring
   - ST_Line_Locate_Point renamed to ST_LineLocatePoint
+  - ST_Force_XXX renamed to ST_ForceXXX
   - ST_MapAlgebraFctNgb and 1 and 2 raster variants of ST_MapAlgebraFct.
     Use ST_MapAlgebra instead
   - 1 and 2 raster variants of ST_MapAlgebraExpr.
index 730c1876f9a5c536b66cc2a290a81e9960f784b5..5ccb539fc06687e8871977505a3888d71a647f0d 100644 (file)
@@ -59,7 +59,7 @@
       example, the commands are like:</para>
 
       <programlisting>SELECT AddGeometryColumn('myschema','mytable','bbox','4326','GEOMETRY','2'); 
-UPDATE mytable SET bbox = ST_Envelope(ST_Force_2d(the_geom));</programlisting>
+UPDATE mytable SET bbox = ST_Envelope(ST_Force2D(the_geom));</programlisting>
 
       <para>Now change your query to use the &amp;&amp; operator against bbox
       instead of geom_column, like:</para>
@@ -115,11 +115,11 @@ ALTER TABLE</programlisting>
     <para>Sometimes, you happen to have 3D or 4D data in your table, but
     always access it using OpenGIS compliant ST_AsText() or ST_AsBinary()
     functions that only output 2D geometries. They do this by internally
-    calling the ST_Force_2d() function, which introduces a significant
+    calling the ST_Force2D() function, which introduces a significant
     overhead for large geometries. To avoid this overhead, it may be feasible
     to pre-drop those additional dimensions once and forever:</para>
 
-    <programlisting>UPDATE mytable SET the_geom = ST_Force_2d(the_geom); 
+    <programlisting>UPDATE mytable SET the_geom = ST_Force2D(the_geom); 
 VACUUM FULL ANALYZE mytable;</programlisting>
 
     <para>Note that if you added your geometry column using
index de8cb04efa125688e4c73889837373fd89c55bcb..df4dd33c1eb24cf9dbccb8f47c0740da37a43752 100644 (file)
@@ -172,7 +172,7 @@ SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi
 
        <refentry id="ST_Force_2D">
          <refnamediv>
-               <refname>ST_Force_2D</refname>
+               <refname>ST_Force2D</refname>
 
                <refpurpose>Forces the geometries into a "2-dimensional mode" so that
                all output representations will only have the X and Y coordinates.</refpurpose>
@@ -181,7 +181,7 @@ SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi
          <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>geometry <function>ST_Force_2D</function></funcdef>
+                       <funcdef>geometry <function>ST_Force2D</function></funcdef>
                        <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
@@ -196,6 +196,7 @@ SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi
                specifies 2-D geometries).</para>
 
                <para>Enhanced: 2.0.0 support for Polyhedral surfaces was introduced.</para>
+               <para>Changed: 2.1.0. Up to 2.0.x this was called ST_Force_2D.</para>
                <para>&curve_support;</para>
                <para>&P_support;</para>
                <para>&Z_support;</para>
@@ -205,12 +206,12 @@ SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi
          <refsection>
                <title>Examples</title>
 
-               <programlisting>SELECT ST_AsEWKT(ST_Force_2D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
+               <programlisting>SELECT ST_AsEWKT(ST_Force2D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
                st_asewkt
 -------------------------------------
 CIRCULARSTRING(1 1,2 3,4 5,6 7,5 6)
 
-SELECT  ST_AsEWKT(ST_Force_2D('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2))'));
+SELECT  ST_AsEWKT(ST_Force2D('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2))'));
 
                                  st_asewkt
 ----------------------------------------------
@@ -229,15 +230,15 @@ SELECT  ST_AsEWKT(ST_Force_2D('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1
 
        <refentry id="ST_Force_3D">
          <refnamediv>
-               <refname>ST_Force_3D</refname>
+               <refname>ST_Force3D</refname>
 
-               <refpurpose>Forces the geometries into XYZ mode.  This is an alias for ST_Force_3DZ.</refpurpose>
+               <refpurpose>Forces the geometries into XYZ mode.  This is an alias for ST_Force3DZ.</refpurpose>
          </refnamediv>
 
          <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>geometry <function>ST_Force_3D</function></funcdef>
+                       <funcdef>geometry <function>ST_Force3D</function></funcdef>
                        <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
@@ -249,6 +250,7 @@ SELECT  ST_AsEWKT(ST_Force_2D('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1
                <para>Forces the geometries into XYZ mode.  This is an alias for ST_Force_3DZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on.</para>
 
                <para>Enhanced: 2.0.0 support for Polyhedral surfaces was introduced.</para>
+               <para>Changed: 2.1.0. Up to 2.0.x this was called ST_Force_3D.</para>
                <para>&P_support;</para>
                <para>&curve_support;</para>
                <para>&Z_support;</para>
@@ -260,13 +262,13 @@ SELECT  ST_AsEWKT(ST_Force_2D('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1
 
                <programlisting>
                --Nothing happens to an already 3D geometry
-               SELECT ST_AsEWKT(ST_Force_3D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
+               SELECT ST_AsEWKT(ST_Force3D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
                                   st_asewkt
 -----------------------------------------------
  CIRCULARSTRING(1 1 2,2 3 2,4 5 2,6 7 2,5 6 2)
 
 
-SELECT  ST_AsEWKT(ST_Force_3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
+SELECT  ST_AsEWKT(ST_Force3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
 
                                                 st_asewkt
 --------------------------------------------------------------
@@ -284,15 +286,15 @@ SELECT  ST_AsEWKT(ST_Force_3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
 
        <refentry id="ST_Force_3DZ">
          <refnamediv>
-               <refname>ST_Force_3DZ</refname>
+               <refname>ST_Force3DZ</refname>
 
-               <refpurpose>Forces the geometries into XYZ mode.  This is a synonym for ST_Force_3D.</refpurpose>
+               <refpurpose>Forces the geometries into XYZ mode.  This is a synonym for ST_Force3D.</refpurpose>
          </refnamediv>
 
          <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>geometry <function>ST_Force_3DZ</function></funcdef>
+                       <funcdef>geometry <function>ST_Force3DZ</function></funcdef>
                        <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
@@ -301,9 +303,10 @@ SELECT  ST_AsEWKT(ST_Force_3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
          <refsection>
                <title>Description</title>
 
-               <para>Forces the geometries into XYZ mode.  This is a synonym for ST_Force_3DZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on.</para>
+               <para>Forces the geometries into XYZ mode.  This is a synonym for ST_Force3DZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on.</para>
 
                <para>Enhanced: 2.0.0 support for Polyhedral surfaces was introduced.</para>
+               <para>Changed: 2.1.0. Up to 2.0.x this was called ST_Force_3DZ.</para>
                <para>&P_support;</para>
                <para>&Z_support;</para>
                <para>&curve_support;</para>
@@ -315,13 +318,13 @@ SELECT  ST_AsEWKT(ST_Force_3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
 
                <programlisting>
 --Nothing happens to an already 3D geometry
-SELECT ST_AsEWKT(ST_Force_3DZ(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
+SELECT ST_AsEWKT(ST_Force3DZ(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
                                   st_asewkt
 -----------------------------------------------
  CIRCULARSTRING(1 1 2,2 3 2,4 5 2,6 7 2,5 6 2)
 
 
-SELECT  ST_AsEWKT(ST_Force_3DZ('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
+SELECT  ST_AsEWKT(ST_Force3DZ('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
 
                                                 st_asewkt
 --------------------------------------------------------------
@@ -339,7 +342,7 @@ SELECT  ST_AsEWKT(ST_Force_3DZ('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
 
        <refentry id="ST_Force_3DM">
          <refnamediv>
-               <refname>ST_Force_3DM</refname>
+               <refname>ST_Force3DM</refname>
 
                <refpurpose>Forces the geometries into XYM mode.</refpurpose>
          </refnamediv>
@@ -347,7 +350,7 @@ SELECT  ST_AsEWKT(ST_Force_3DZ('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
          <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>geometry <function>ST_Force_3DM</function></funcdef>
+                       <funcdef>geometry <function>ST_Force3DM</function></funcdef>
                        <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
@@ -359,6 +362,7 @@ SELECT  ST_AsEWKT(ST_Force_3DZ('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
                <para>Forces the geometries into XYM mode.  If a geometry has no M component, then a 0 M coordinate is tacked on.  If it has a Z component, then Z is removed</para>
 
 
+                 <para>Changed: 2.1.0. Up to 2.0.x this was called ST_Force_3DM.</para>
                <para>&curve_support;</para>
          </refsection>
 
@@ -368,13 +372,13 @@ SELECT  ST_AsEWKT(ST_Force_3DZ('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
 
                <programlisting>
 --Nothing happens to an already 3D geometry
-SELECT ST_AsEWKT(ST_Force_3DM(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
+SELECT ST_AsEWKT(ST_Force3DM(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
                                   st_asewkt
 ------------------------------------------------
  CIRCULARSTRINGM(1 1 0,2 3 0,4 5 0,6 7 0,5 6 0)
 
 
-SELECT  ST_AsEWKT(ST_Force_3DM('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1))'));
+SELECT  ST_AsEWKT(ST_Force3DM('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1))'));
 
                                                  st_asewkt
 ---------------------------------------------------------------
@@ -393,7 +397,7 @@ SELECT  ST_AsEWKT(ST_Force_3DM('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1
 
        <refentry id="ST_Force_4D">
          <refnamediv>
-               <refname>ST_Force_4D</refname>
+               <refname>ST_Force4D</refname>
 
                <refpurpose>Forces the geometries into XYZM mode.  </refpurpose>
          </refnamediv>
@@ -401,7 +405,7 @@ SELECT  ST_AsEWKT(ST_Force_3DM('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1
          <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>geometry <function>ST_Force_4D</function></funcdef>
+                       <funcdef>geometry <function>ST_Force4D</function></funcdef>
                        <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
@@ -412,6 +416,7 @@ SELECT  ST_AsEWKT(ST_Force_3DM('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1
 
                <para>Forces the geometries into XYZM mode.  0 is tacked on for missing Z and M dimensions. </para>
 
+                 <para>Changed: 2.1.0. Up to 2.0.x this was called ST_Force_4D.</para>
                <para>&Z_support;</para>
                <para>&curve_support;</para>
          </refsection>
@@ -422,14 +427,14 @@ SELECT  ST_AsEWKT(ST_Force_3DM('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1
 
                <programlisting>
 --Nothing happens to an already 3D geometry
-SELECT ST_AsEWKT(ST_Force_4D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
+SELECT ST_AsEWKT(ST_Force4D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
                                                st_asewkt
 ---------------------------------------------------------
  CIRCULARSTRING(1 1 2 0,2 3 2 0,4 5 2 0,6 7 2 0,5 6 2 0)
 
 
 
-SELECT  ST_AsEWKT(ST_Force_4D('MULTILINESTRINGM((0 0 1,0 5 2,5 0 3,0 0 4),(1 1 1,3 1 1,1 3 1,1 1 1))'));
+SELECT  ST_AsEWKT(ST_Force4D('MULTILINESTRINGM((0 0 1,0 5 2,5 0 3,0 0 4),(1 1 1,3 1 1,1 3 1,1 1 1))'));
 
                                                                          st_asewkt
 --------------------------------------------------------------------------------------
@@ -448,7 +453,7 @@ SELECT  ST_AsEWKT(ST_Force_4D('MULTILINESTRINGM((0 0 1,0 5 2,5 0 3,0 0 4),(1 1 1
 
        <refentry id="ST_Force_Collection">
          <refnamediv>
-               <refname>ST_Force_Collection</refname>
+               <refname>ST_ForceCollection</refname>
 
                <refpurpose>Converts the geometry into a GEOMETRYCOLLECTION.</refpurpose>
          </refnamediv>
@@ -456,7 +461,7 @@ SELECT  ST_AsEWKT(ST_Force_4D('MULTILINESTRINGM((0 0 1,0 5 2,5 0 3,0 0 4),(1 1 1
          <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>geometry <function>ST_Force_Collection</function></funcdef>
+                       <funcdef>geometry <function>ST_ForceCollection</function></funcdef>
                        <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
@@ -470,6 +475,7 @@ SELECT  ST_AsEWKT(ST_Force_4D('MULTILINESTRINGM((0 0 1,0 5 2,5 0 3,0 0 4),(1 1 1
 
                <para>Enhanced: 2.0.0 support for Polyhedral surfaces was introduced.</para>
                <para>Availability: 1.2.2, prior to 1.3.4 this function will crash with Curves.  This is fixed in 1.3.4+</para>
+               <para>Changed: 2.1.0. Up to 2.0.x this was called ST_Force_Collection.</para>
                
                <para>&P_support;</para>
                <para>&Z_support;</para>
@@ -482,14 +488,14 @@ SELECT  ST_AsEWKT(ST_Force_4D('MULTILINESTRINGM((0 0 1,0 5 2,5 0 3,0 0 4),(1 1 1
 
                <programlisting>
 
-SELECT  ST_AsEWKT(ST_Force_Collection('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1))'));
+SELECT  ST_AsEWKT(ST_ForceCollection('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1))'));
 
                                                                   st_asewkt
 ----------------------------------------------------------------------------------
  GEOMETRYCOLLECTION(POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1)))
 
 
-  SELECT ST_AsText(ST_Force_Collection('CIRCULARSTRING(220227 150406,2220227 150407,220227 150406)'));
+  SELECT ST_AsText(ST_ForceCollection('CIRCULARSTRING(220227 150406,2220227 150407,220227 150406)'));
                                                                   st_astext
 --------------------------------------------------------------------------------
  GEOMETRYCOLLECTION(CIRCULARSTRING(220227 150406,2220227 150407,220227 150406))
@@ -499,7 +505,7 @@ SELECT  ST_AsEWKT(ST_Force_Collection('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,
                
                <programlisting>
 -- POLYHEDRAL example --
-SELECT ST_AsEWKT(ST_Force_Collection('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
+SELECT ST_AsEWKT(ST_ForceCollection('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
  ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),
  ((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),
  ((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
index f0e4eb63ac972f3ee2e155d0ffb62ab38005bc14..415d087ef71432f601366d9114ae8e0cbb83fae9 100644 (file)
@@ -1168,43 +1168,97 @@ CREATE OR REPLACE FUNCTION ST_azimuth(geom1 geometry, geom2 geometry)
 ------------------------------------------------------------------------
 -- MISC
 ------------------------------------------------------------------------
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_2d(geometry)
+
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_Force2D(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_2d'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_3dz(geometry)
+-- Deprecation in 2.1.0
+CREATE OR REPLACE FUNCTION ST_force_2d(geometry)
+       RETURNS geometry AS
+  $$ SELECT _postgis_deprecate('ST_Force_2d', 'ST_Force2D', '2.1.0');
+    SELECT ST_Force2D($1);
+  $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_Force3DZ(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
-
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_3d(geometry)
+-- Deprecation in 2.1.0
+CREATE OR REPLACE FUNCTION ST_force_3dz(geometry)
+       RETURNS geometry AS
+  $$ SELECT _postgis_deprecate('ST_Force_3dz', 'ST_Force3DZ', '2.1.0');
+    SELECT ST_Force3DZ($1);
+  $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_Force3D(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_3dm(geometry)
+-- Deprecation in 2.1.0
+CREATE OR REPLACE FUNCTION ST_force_3d(geometry)
+       RETURNS geometry AS
+  $$ SELECT _postgis_deprecate('ST_Force_3d', 'ST_Force3D', '2.1.0');
+    SELECT ST_Force3D($1);
+  $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_Force3DM(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_3dm'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_4d(geometry)
+-- Deprecation in 2.1.0
+CREATE OR REPLACE FUNCTION ST_force_3dm(geometry)
+       RETURNS geometry AS
+  $$ SELECT _postgis_deprecate('ST_Force_3dm', 'ST_Force3DM', '2.1.0');
+    SELECT ST_Force3DM($1);
+  $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_Force4D(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_4d'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_collection(geometry)
+-- Deprecation in 2.1.0
+CREATE OR REPLACE FUNCTION ST_force_4d(geometry)
+       RETURNS geometry AS
+  $$ SELECT _postgis_deprecate('ST_Force_4d', 'ST_Force4D', '2.1.0');
+    SELECT ST_Force4D($1);
+  $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_ForceCollection(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_collection'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
+-- Availability: 1.2.2
+-- Deprecation in 2.1.0
+CREATE OR REPLACE FUNCTION ST_force_collection(geometry)
+       RETURNS geometry AS
+  $$ SELECT _postgis_deprecate('ST_Force_Collection', 'ST_ForceCollection', '2.1.0');
+    SELECT ST_ForceCollection($1);
+  $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
 -- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION ST_CollectionExtract(geometry, integer)
        RETURNS geometry
index b1895338d43a9c23eea46588c57b38478162865d..7a36b6546771a84ca48c5beedf7bcc824bfc91be 100644 (file)
@@ -21,11 +21,11 @@ INSERT INTO tm.geoms(g) values ('TIN EMPTY');
 
 -- all zm flags
 INSERT INTO tm.geoms(g)
-SELECT st_force_3dz(g) FROM tm.geoms WHERE id < 15 ORDER BY id;
+SELECT st_force3dz(g) FROM tm.geoms WHERE id < 15 ORDER BY id;
 INSERT INTO tm.geoms(g)
-SELECT st_force_3dm(g) FROM tm.geoms WHERE id < 15 ORDER BY id;
+SELECT st_force3dm(g) FROM tm.geoms WHERE id < 15 ORDER BY id;
 INSERT INTO tm.geoms(g)
-SELECT st_force_4d(g) FROM tm.geoms WHERE id < 15 ORDER BY id;
+SELECT st_force4d(g) FROM tm.geoms WHERE id < 15 ORDER BY id;
 
 -- known srid
 INSERT INTO tm.geoms(g)
index fe4ae97c705c0874f6358d48db6e7f4c0715b37c..0e00aa8e75770188c64d95e68d48038eb04884b3 100644 (file)
@@ -93,10 +93,10 @@ SELECT id,wkt FROM test_data WHERE
 
 SELECT ST_extent(geometry(wkb_ndr)) from test_data;
 SELECT ST_3DExtent(geometry(wkb_ndr)) from test_data WHERE ST_NDims(wkb_ndr) > 2;
-SELECT ST_mem_size(ST_collect(ST_force_2d(geometry(wkb_ndr)))) from test_data;
-SELECT ST_mem_size(ST_collect(ST_force_3dz(geometry(wkb_ndr)))) from test_data;
-SELECT ST_mem_size(ST_collect(ST_force_4d(ST_force_2d(geometry(wkb_ndr))))) from test_data;
-SELECT ST_mem_size(ST_collect(ST_force_3dm(geometry(wkb_ndr)))) from test_data;
-SELECT ST_mem_size(ST_collect(ST_force_2d(ST_force_4d(ST_force_3dm(ST_force_3dz(ST_force_2d(geometry(wkb_ndr)))))))) from test_data;
+SELECT ST_mem_size(ST_collect(ST_Force2d(geometry(wkb_ndr)))) from test_data;
+SELECT ST_mem_size(ST_collect(ST_Force3dz(geometry(wkb_ndr)))) from test_data;
+SELECT ST_mem_size(ST_collect(ST_Force4d(ST_force2d(geometry(wkb_ndr))))) from test_data;
+SELECT ST_mem_size(ST_collect(ST_Force3dm(geometry(wkb_ndr)))) from test_data;
+SELECT ST_mem_size(ST_collect(ST_Force2d(ST_force4d(ST_force3dm(ST_force3dz(ST_force2d(geometry(wkb_ndr)))))))) from test_data;
 
 DROP TABLE test_data;
index 88560edf9421ee8788afc6942684392a4ab49d6f..1057a40529bc4694616ee94d9a30dd58f61dd619 100644 (file)
@@ -234,16 +234,16 @@ select '141', ST_AsEWKT(ST_multi(ST_setsrid('LINESTRING(2 2, 3 3)'::geometry, 4)
 select '142', ST_AsEWKT(ST_multi(ST_setsrid('LINESTRING(2 2, 3 3)'::geometry, 5)));
 select '143', ST_AsEWKT(ST_multi(ST_setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6)));
 select '143c1', ST_AsEWKT(ST_multi('CIRCULARSTRING(0 0, 1 1, 2 2)'::geometry));
-select '144', ST_AsEWKT(ST_force_3dm('POINT(1 2 3)'));
-select '145', ST_AsEWKT(ST_force_3dz('POINTM(1 2 3)'));
-select '146', ST_AsEWKT(ST_force_4d('POINTM(1 2 3)'));
-select '147', ST_AsEWKT(ST_force_4d('POINT(1 2 3)'));
+select '144', ST_AsEWKT(ST_Force3DM('POINT(1 2 3)'));
+select '145', ST_AsEWKT(ST_Force3DZ('POINTM(1 2 3)'));
+select '146', ST_AsEWKT(ST_Force4D('POINTM(1 2 3)'));
+select '147', ST_AsEWKT(ST_Force4D('POINT(1 2 3)'));
 
 select '148', ST_AsText(ST_segmentize('LINESTRING(0 0, 10 0)'::geometry, 5));
 
 select '149', ST_AsText(ST_segmentize('GEOMETRYCOLLECTION EMPTY'::geometry, 0.5));
 
-select '150', ST_AsEWKT(ST_force_collection(ST_setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6)));
+select '150', ST_AsEWKT(ST_ForceCollection(ST_setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6)));
 
 select '151', ST_MakeEnvelope(0, 0, 1, 1, 4326);
 select '152', ST_SRID(ST_MakeEnvelope(0, 0, 1, 1, 4326));
index ed7d4a37ab5ed507bbbf329cddd91aa8c3a04453..21179c72f07daffb56992754c9332b016b8caa85 100644 (file)
@@ -71,7 +71,7 @@ SELECT '#69', ST_AsText(ST_Translate(ST_GeomFromText('CIRCULARSTRING(220268 1504
 SELECT '#70', ST_NPoints(ST_LinetoCurve(ST_Buffer('POINT(1 2)',3)));
 
 -- #73 --
-SELECT '#73', ST_AsText(ST_Force_Collection(ST_GeomFromEWKT('CIRCULARSTRING(1 1, 2 3, 4 5, 6 7, 5 6)')));
+SELECT '#73', ST_AsText(ST_ForceCollection(ST_GeomFromEWKT('CIRCULARSTRING(1 1, 2 3, 4 5, 6 7, 5 6)')));
 
 -- #80 --
 SELECT '#80', ST_AsText(ST_Multi('MULTILINESTRING((0 0,1 1))'));
@@ -553,7 +553,7 @@ with inp as ( select 'MULTILINESTRING((0 0, 2 0))'::geometry as g )
 SELECT '#1454', st_orderingequals(g,g) from inp;
 
 -- #1414
-SELECT '#1414', st_astext(st_force_3dz('CURVEPOLYGON EMPTY'));
+SELECT '#1414', st_astext(st_Force3DZ('CURVEPOLYGON EMPTY'));
 
 -- #1478
 SELECT '#1478', 'SRID=1;POINT EMPTY'::geometry::text::geometry;
index 19c0b33b167d161f7f658cffced7e334b6cdbe3a..83c5bcde3db350ca74947eabd4ea11cb35449ac0 100644 (file)
@@ -248,11 +248,11 @@ INSERT INTO tm.types(g) values ('TIN EMPTY');
 
 -- all zm flags
 INSERT INTO tm.types(g)
-SELECT st_force_3dz(g) FROM tm.types WHERE id < 15 ORDER BY id;
+SELECT st_force3dz(g) FROM tm.types WHERE id < 15 ORDER BY id;
 INSERT INTO tm.types(g)
-SELECT st_force_3dm(g) FROM tm.types WHERE id < 15 ORDER BY id;
+SELECT st_force3dm(g) FROM tm.types WHERE id < 15 ORDER BY id;
 INSERT INTO tm.types(g)
-SELECT st_force_4d(g) FROM tm.types WHERE id < 15 ORDER BY id;
+SELECT st_force4d(g) FROM tm.types WHERE id < 15 ORDER BY id;
 
 -- known srid
 INSERT INTO tm.types(g)
index f5404c78ef0c169a508cb1c1780bc5f33bf3983c..a4a573253a6b4851a8fdcb83bf0cd5242d6140f9 100644 (file)
@@ -15,23 +15,23 @@ SELECT 'Running Geoserver 2.0 NG tests...';
 SELECT 'Geoserver1', upper(TYPE) As TYPE FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt';
 SELECT 'Geoserver2', SRID FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt';
 -- Run a Geoserver 2.0 NG WMS query
-SELECT 'Geoserver3', "id",substr(encode(ST_AsBinary(ST_Force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-6.58216065979069 -0.7685569763184591, -6.58216065979069 0.911225433349509, -3.050569931030911 0.911225433349509, -3.050569931030911 -0.7685569763184591, -6.58216065979069 -0.7685569763184591))', 4326);
+SELECT 'Geoserver3', "id",substr(encode(ST_AsBinary(ST_Force2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-6.58216065979069 -0.7685569763184591, -6.58216065979069 0.911225433349509, -3.050569931030911 0.911225433349509, -3.050569931030911 -0.7685569763184591, -6.58216065979069 -0.7685569763184591))', 4326);
 -- Run a Geoserver 2.0 NG KML query
 SELECT 'Geoserver4', count(*) FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326);
-SELECT 'Geoserver5', "id",substr(encode(ST_AsBinary(ST_Force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326);
-SELECT 'Geoserver6', "id",substr(encode(ST_AsBinary(ST_Force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.507182836191598 24.031312785172446, -1.507182836191598 25.995557016429064, 1.7399982474034008 25.995557016429064, 1.7399982474034008 24.031312785172446, -1.507182836191598 24.031312785172446))', 4326);
+SELECT 'Geoserver5', "id",substr(encode(ST_AsBinary(ST_Force2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326);
+SELECT 'Geoserver6', "id",substr(encode(ST_AsBinary(ST_Force2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.507182836191598 24.031312785172446, -1.507182836191598 25.995557016429064, 1.7399982474034008 25.995557016429064, 1.7399982474034008 24.031312785172446, -1.507182836191598 24.031312785172446))', 4326);
 
 -- MapServer 5.4 tests
 select 'MapServer1', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null;
-select 'MapServer2', "id",substr(encode(ST_AsBinary(ST_Force_collection(ST_Force_2d("pt")),'NDR'),'base64'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt'));
+select 'MapServer2', "id",substr(encode(ST_AsBinary(ST_ForceCollection(ST_Force2d("pt")),'NDR'),'base64'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt'));
 
 -- MapServer 5.6 tests
 select * from wmstest where false limit 0;
 select 'MapServer3', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null;
-select 'MapServer4', "id",substr(encode(ST_AsBinary(ST_Force_collection(ST_Force_2d("pt")),'NDR'),'hex'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt'));
+select 'MapServer4', "id",substr(encode(ST_AsBinary(ST_ForceCollection(ST_Force2d("pt")),'NDR'),'hex'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt'));
 
 -- Drop the data table
 SELECT 'Removing the data table...';
 DROP TABLE wmstest;
 --DELETE FROM geometry_columns WHERE f_table_name = 'wmstest' AND f_table_schema = 'public';
-SELECT 'Done.';
\ No newline at end of file
+SELECT 'Done.';