Commit fc1f928c authored by Sandro Santilli's avatar Sandro Santilli

Warn deprecation of ST_Locate_Between_Measures and ST_Locate_Along_Measure

Also add TODO item about switching to the pure-sql deprecation method
(still not done now because output is slightly different between the
old and new versions). See #2748.

git-svn-id: http://svn.osgeo.org/postgis/[email protected] b70326c6-7e19-0410-871a-916f4a2858ee
parent f48830ef
......@@ -702,7 +702,7 @@ Datum LWGEOM_locate_between_m(PG_FUNCTION_ARGS)
int hasm = gserialized_has_m(gin);
int type;
elog(NOTICE,"ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween.");
elog(WARNING,"ST_Locate_Between_Measures and ST_Locate_Along_Measure were deprecated in 2.2.0. Please use ST_LocateAlong and ST_LocateBetween");
if ( end_measure < start_measure )
{
......
......@@ -50,7 +50,7 @@ DECLARE
curver_text text;
BEGIN
--
-- Raises a NOTICE if it was deprecated in this version,
-- Raises a DEBUG if it was deprecated in this version,
-- a WARNING if in a previous version (only up to minor version checked)
--
curver_text := POSTGIS_LIB_VERSION;
......@@ -3007,12 +3007,16 @@ CREATE OR REPLACE FUNCTION ST_line_locate_point(geom1 geometry, geom2 geometry)
LANGUAGE 'sql' IMMUTABLE STRICT;
-- Availability: 1.2.2
-- Deprecation in 2.0.0 replaced by ST_LocateBetween
-- TODO: switch to use of _postgis_deprecate() in 2.3.0 (or drop)
CREATE OR REPLACE FUNCTION ST_locate_between_measures(geometry, float8, float8)
RETURNS geometry
AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m'
LANGUAGE 'c' IMMUTABLE STRICT;
-- Availability: 1.2.2
-- Deprecation in 2.0.0 replaced by ST_LocateAlong
-- TODO: switch to use of _postgis_deprecate() in 2.3.0 (or drop)
CREATE OR REPLACE FUNCTION ST_locate_along_measure(geometry, float8)
RETURNS geometry
AS $$ SELECT ST_locate_between_measures($1, $2, $2) $$
......
#2|POLYGON((1 1,1 2,2 2,3 2,3 1,2 1,1 1))
#11|0
NOTICE: ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween.
WARNING: ST_Locate_Between_Measures and ST_Locate_Along_Measure were deprecated in 2.2.0. Please use ST_LocateAlong and ST_LocateBetween
#21|SRID=31293;POINTM(6220.13 5337367.145 4566)
t
ERROR: AddGeometryColumn() - invalid SRID
......@@ -17,7 +17,7 @@ ERROR: lwgeom_longitude_shift: unsupported geom type: CircularString
#83|MULTICURVE(CIRCULARSTRING(220268 150415,220227 150505,220227 150406))
ERROR: LWGEOM2SFCGAL: Unknown geometry type !
#112|GEOMETRYCOLLECTION(POINT(-10 50))
NOTICE: ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween.
WARNING: ST_Locate_Between_Measures and ST_Locate_Along_Measure were deprecated in 2.2.0. Please use ST_LocateAlong and ST_LocateBetween
ERROR: Geometry argument does not have an 'M' ordinate
#116|POLYGON EMPTY
#122|CIRCULARSTRING(220268 150415,220227 150505,220227 150406)
......
#2|POLYGON((1 1,1 2,2 2,3 2,3 1,2 1,1 1))
#11|0
NOTICE: ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween.
WARNING: ST_Locate_Between_Measures and ST_Locate_Along_Measure were deprecated in 2.2.0. Please use ST_LocateAlong and ST_LocateBetween
#21|SRID=31293;POINTM(6220.13 5337367.145 4566)
t
ERROR: AddGeometryColumn() - invalid SRID
......@@ -17,7 +17,7 @@ ERROR: lwgeom_longitude_shift: unsupported geom type: CircularString
#83|MULTICURVE(CIRCULARSTRING(220268 150415,220227 150505,220227 150406))
#85|0
#112|GEOMETRYCOLLECTION(POINT(-10 50))
NOTICE: ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween.
WARNING: ST_Locate_Between_Measures and ST_Locate_Along_Measure were deprecated in 2.2.0. Please use ST_LocateAlong and ST_LocateBetween
ERROR: Geometry argument does not have an 'M' ordinate
#116|POLYGON EMPTY
#122|CIRCULARSTRING(220268 150415,220227 150505,220227 150406)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment