ST_LocateBetweenElevations
Name
ST_LocateBetweenElevations — Return a derived geometry (collection) value with elements that intersect the specified range of elevations inclusively. Only 3D, 4D LINESTRINGS and MULTILINESTRINGS are supported.
Synopsis
geometry
ST_LocateBetweenElevations
(
geometry
geom_mline
, float8
elevation_start
, float8
elevation_end
)
;
Description
Return a derived geometry (collection) value with elements that intersect the specified range of elevations inclusively. Only 3D, 3DM LINESTRINGS and MULTILINESTRINGS are supported.
Availability: 1.4.0
This function supports 3d and will not drop the z-index.
Examples
SELECT ST_AsEWKT(ST_LocateBetweenElevations( ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6)'),2,4)) As ewelev; ewelev ---------------------------------------------------------------- MULTILINESTRING((1 2 3,2 3 4)) SELECT ST_AsEWKT(ST_LocateBetweenElevations( ST_GeomFromEWKT('LINESTRING(1 2 6, 4 5 -1, 7 8 9)'),6,9)) As ewelev; ewelev ---------------------------------------------------------------- GEOMETRYCOLLECTION(POINT(1 2 6),LINESTRING(6.1 7.1 6,7 8 9)) --Geometry collections are difficult animals so dump them --to make them more digestable SELECT ST_AsEWKT((ST_Dump(the_geom)).geom) FROM (SELECT ST_LocateBetweenElevations( ST_GeomFromEWKT('LINESTRING(1 2 6, 4 5 -1, 7 8 9)'),6,9) As the_geom) As foo; st_asewkt -------------------------------- POINT(1 2 6) LINESTRING(6.1 7.1 6,7 8 9)