From: Nicklas Avén Date: Mon, 28 Mar 2011 18:46:28 +0000 (+0000) Subject: Putting renamed 3D-functions in legacy.sql.c and some clarifying notes about the... X-Git-Tag: 2.0.0alpha1~1826 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71416b38a4502892d54d7e4d28523b3fb6a1db02;p=postgis Putting renamed 3D-functions in legacy.sql.c and some clarifying notes about the renaming git-svn-id: http://svn.osgeo.org/postgis/trunk@6976 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_constructor.xml b/doc/reference_constructor.xml index 2958c763a..a79479200 100644 --- a/doc/reference_constructor.xml +++ b/doc/reference_constructor.xml @@ -1113,7 +1113,6 @@ WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-989502.1875, 528439. Creates a BOX3D defined by the given 3d point geometries. - @@ -1136,6 +1135,7 @@ WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-989502.1875, 528439. This function supports 3d and will not drop the z-index. + Changed: 2.0.0 In prior versions this used to be called ST_MakeBox3D diff --git a/doc/reference_measure.xml b/doc/reference_measure.xml index 911cbe31c..4fd23dc09 100644 --- a/doc/reference_measure.xml +++ b/doc/reference_measure.xml @@ -2769,8 +2769,8 @@ FROM (SELECT ST_GeographyFromText( Returns the 3-dimensional or 2-dimensional length of the geometry if it is a linestring or multi-linestring. For 2-d lines it will just return the 2-d length (same as ST_Length and ST_Length2D) - &Z_support; + Changed: 2.0.0 In prior versions this used to be called ST_Length3D @@ -2981,8 +2981,8 @@ CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m) as foo Will return 0 for anything that is not a MULTILINESTRING or LINESTRING This function is just an alias for ST_Length_Spheroid. - &Z_support; + Changed: 2.0.0 In prior versions this used to be called ST_Length_Spheroid3D @@ -3406,8 +3406,8 @@ st_perimeter Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon. If the geometry is 2-dimensional, then the 2-dimensional perimeter is returned. - &Z_support; + Changed: 2.0.0 In prior versions this used to be called ST_Perimeter3D diff --git a/doc/reference_misc.xml b/doc/reference_misc.xml index 089eca586..245891601 100644 --- a/doc/reference_misc.xml +++ b/doc/reference_misc.xml @@ -431,6 +431,7 @@ SELECT ST_SetSRID(ST_Extent(the_geom),2249) as bextent FROM sometable; Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + Changed: 2.0.0 In prior versions this used to be called ST_Extent3D &Z_support; &curve_support; &P_support; diff --git a/postgis/legacy.sql.in.c b/postgis/legacy.sql.in.c index d2baa88cd..d701d386a 100644 --- a/postgis/legacy.sql.in.c +++ b/postgis/legacy.sql.in.c @@ -1867,3 +1867,39 @@ CREATE OR REPLACE FUNCTION geometry(chip) CREATE CAST (chip AS geometry) WITH FUNCTION geometry(chip) AS IMPLICIT; -- END CHIP -- +------------------------------------------------ +--Begin 3D functions -- +------------------------------------------------ + +-- Renamed in 2.0.0 to ST_3DLength +CREATE OR REPLACE FUNCTION ST_Length3D(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' + LANGUAGE 'C' IMMUTABLE STRICT; + +-- Renamed in 2.0.0 to ST_3DLength_spheroid +CREATE OR REPLACE FUNCTION ST_Length_spheroid3D(geometry, spheroid) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' + LANGUAGE 'C' IMMUTABLE STRICT + COST 100; + +-- Renamed in 2.0.0 to ST_3DPerimeter +CREATE OR REPLACE FUNCTION ST_Perimeter3D(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly' + LANGUAGE 'C' IMMUTABLE STRICT; + +-- Renamed in 2.0.0 to ST_3DMakeBox +CREATE OR REPLACE FUNCTION ST_MakeBox3D(geometry, geometry) + RETURNS box3d + AS 'MODULE_PATHNAME', 'BOX3D_construct' + LANGUAGE 'C' IMMUTABLE STRICT; + +-- Renamed in 2.0.0 to ST_3DExtent +CREATE AGGREGATE ST_Extent3D( + sfunc = ST_combine_bbox, + basetype = geometry, + stype = box3d + ); +--END 3D functions-- diff --git a/postgis/postgis.sql.in.c b/postgis/postgis.sql.in.c index 171113293..e54368971 100644 --- a/postgis/postgis.sql.in.c +++ b/postgis/postgis.sql.in.c @@ -1046,7 +1046,7 @@ CREATE OR REPLACE FUNCTION ST_nrings(geometry) ------------------------------------------------------------------------ -- Misures ------------------------------------------------------------------------ --- Availability: 1.2.2 +-- Availability: 2.0.0 CREATE OR REPLACE FUNCTION ST_3DLength(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' @@ -1066,7 +1066,7 @@ CREATE OR REPLACE FUNCTION ST_Length(geometry) -- this is a fake (for back-compatibility) -- uses 3d if 3d is available, 2d otherwise --- Availability: 1.2.2 +-- Availability: 2.0.0 CREATE OR REPLACE FUNCTION ST_3DLength_spheroid(geometry, spheroid) RETURNS FLOAT8 AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' @@ -1087,7 +1087,7 @@ CREATE OR REPLACE FUNCTION ST_length2d_spheroid(geometry, spheroid) LANGUAGE 'C' IMMUTABLE STRICT COST 100; --- Availability: 1.2.2 +-- Availability: 2.0.0 CREATE OR REPLACE FUNCTION ST_3DPerimeter(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly' @@ -1356,7 +1356,7 @@ CREATE OR REPLACE FUNCTION ST_MakePointM(float8, float8, float8) AS 'MODULE_PATHNAME', 'LWGEOM_makepoint3dm' LANGUAGE 'C' IMMUTABLE STRICT; --- Availability: 1.2.2 +-- Availability: 2.0.0 CREATE OR REPLACE FUNCTION ST_3DMakeBox(geometry, geometry) RETURNS box3d AS 'MODULE_PATHNAME', 'BOX3D_construct' @@ -1611,7 +1611,7 @@ CREATE OR REPLACE FUNCTION ST_Combine_BBox(box3d,geometry) AS 'MODULE_PATHNAME', 'BOX3D_combine' LANGUAGE 'C' IMMUTABLE; --- Availability: 1.2.2 +-- Availability: 2.0.0 CREATE AGGREGATE ST_3DExtent( sfunc = ST_combine_bbox, basetype = geometry,