]> granicus.if.org Git - postgis/commitdiff
Stub in ST_LocateAlong and ST_LocateBetween for implementation before 2.0
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 30 Dec 2011 13:23:23 +0000 (13:23 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 30 Dec 2011 13:23:23 +0000 (13:23 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8620 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/sqlmm.sql.in.c
postgis/uninstall_sqlmm.sql.in.c

index 1aebf85e0875e5ae0f08e130945e7e7ae8cf78d9..695f39a615b8bd223ef8436e80d8c3ab5671d506 100644 (file)
@@ -313,6 +313,31 @@ CREATE OR REPLACE FUNCTION SE_LocateAlong(geometry, float8)
        AS $$ SELECT SE_LocateBetween($1, $2, $2) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
+---
+-- Linear referencing functions (move to postgis.sql.in.c?)
+---
+CREATE OR REPLACE FUNCTION ST_LocateBetween(geometry, float8, float8)
+       RETURNS geometry
+       AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m'
+       LANGUAGE 'C' IMMUTABLE STRICT;
+       
+CREATE OR REPLACE FUNCTION ST_LocateAlong(geometry, float8)
+       RETURNS geometry
+       AS $$ SELECT SE_LocateBetween($1, $2, $2) $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
+-- LRS with offset parameter
+CREATE OR REPLACE FUNCTION ST_LocateBetween(geometry, float8, float8, float8)
+       RETURNS geometry
+       AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m'
+       LANGUAGE 'C' IMMUTABLE STRICT;
+       
+-- LRS with offset parameter
+CREATE OR REPLACE FUNCTION ST_LocateAlong(geometry, float8, float8)
+       RETURNS geometry
+       AS $$ SELECT SE_LocateBetween($1, $2, $2) $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
 
 
 -------------------------------------------------------------------------------
index c3044ccd8d72996ccd279a18e4a09549d144a8d4..40523da27bd7ca1a9bc1f11c1668810ca613ce80 100644 (file)
@@ -63,6 +63,15 @@ DROP FUNCTION SE_EnvelopesIntersect(geometry,geometry);
 DROP FUNCTION SE_LocateAlong(geometry, float8);
 DROP FUNCTION SE_LocateBetween(geometry, float8, float8);
 
+-------------------------------------------------------------------------------
+-- SQL/MM LRS functions
+-------------------------------------------------------------------------------
+
+DROP FUNCTION ST_LocateBetween(geometry, float8, float8);
+DROP FUNCTION ST_LocateAlong(geometry, float8);
+DROP FUNCTION ST_LocateBetween(geometry, float8, float8, float8);
+DROP FUNCTION ST_LocateAlong(geometry, float8, float8);
+
 -------------------------------------------------------------------------------
 -- END
 -------------------------------------------------------------------------------