ST_LocateBetween — Returns the portions of a geometry that match a measure range.
geometry ST_LocateBetween(geometry geom, float8 measure_start, float8 measure_end, float8 offset = 0);
Devuelve un valor de la colección Geometry derivado con elementos que coinciden con la medida especificada. No se admiten elementos poligonales.
Si se proporciona offset, el resultado se desplaza a la izquierda o a la derecha de la línea de entrada la distancia especificada. Un desplazamiento positivo será hacia la izquierda, y uno negativo hacia la derecha.
Clipping a non-convex POLYGON may produce invalid geometry.
The semantic is specified by the ISO/IEC 13249-3 SQL/MM Spatial standard.
Disponibilidad: 1.1.0 por nombre antiguo ST_Locate_Between_Measures.
Modificado: 2.0.0 en versiones anteriores éste solía llamarse ST_Locate_Along_Measure. El nombre anterior ha quedado obsoleto y se eliminará en el futuro, pero aún está disponible.
Enhanced: 3.0.0 - added support for POLYGON, TIN, TRIANGLE.
This function supports M coordinates.
This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 5.1
SELECT ST_LocateBetween( 'MULTILINESTRING M ((1 2 3,3 4 2,9 4 3),(1 2 3,5 4 5))'::geometry, 1.5, 3);
GEOMETRYCOLLECTION M (LINESTRING M (1 2 3,3 4 2,9 4 3),POINT M (1 2 3))
Extract the section between measures 2 and 8, offset to the left. Because the clipped line and the offset result share the same coordinate space, this example is intended for a single overlay panel rather than separate side-by-side figures.
SELECT ST_LocateBetween(
ST_AddMeasure(
'LINESTRING (20 180,50 20,100 120,180 20)',
0,
10),
2,
8,
20);
MULTILINESTRING((54.49835 104.53427,58.700561 82.122481,82.111456 128.944272,84.248937 132.324934,87.01637 135.21267,90.303073 137.491987,93.977598 139.071724,97.892984 139.888702,101.892639 139.910247,105.816599 139.135495,109.507928 137.595434,112.818995 135.351657,115.617376 132.493901,145.310173 95.377905))