select 'line_interpolate_point', ST_AsText(ST_LineInterpolatePoint('LINESTRING(0 0, 1 1)', 0));
select 'line_interpolate_point', ST_AsText(ST_LineInterpolatePoint('LINESTRING(0 0 10, 1 1 5)', 0.5));
---
---- ST_PointOfClosestApproach
---
-
--- Converging
-select 'pca1', ST_ClosestPointOfApproach(
- 'LINESTRINGZM(0 0 0 0, 10 10 10 10)',
- 'LINESTRINGZM(0 0 0 1, 10 10 10 10)');
--- Following
-select 'pca2', ST_ClosestPointOfApproach(
- 'LINESTRINGZM(0 0 0 0, 10 10 10 10)',
- 'LINESTRINGZM(0 0 0 5, 10 10 10 15)');
--- Crossing
-select 'pca3', ST_ClosestPointOfApproach(
- 'LINESTRINGZM(0 0 0 0, 0 0 0 10)',
- 'LINESTRINGZM(-30 0 5 4, 10 0 5 6)');
--- Ticket #3136
-WITH inp as ( SELECT
- 'LINESTRING M (0 0 80000002,1 0 80000003)'::geometry g1,
- 'LINESTRING M (2 2 80000000,1 1 80000001,0 0 80000002)'::geometry g2 )
-SELECT 'pca#3136',
-ST_ClosestPointOfApproach(g2,g1), ST_ClosestPointOfApproach(g1,g2)
-FROM inp;
--
-- ST_AddMeasure
line_substring_12|POINT Z (0.5 0.5 7.5)
line_interpolate_point|POINT(0 0)
line_interpolate_point|POINT Z (0.5 0.5 7.5)
-pca1|10
-pca2|5
-pca3|5.5
-pca#3136|80000002|80000002
addMeasure1|LINESTRING M (0 0 10,2 0 15,4 0 20)
addMeasure2|LINESTRING M (0 0 10,9 0 19,10 0 20)
interpolatePoint1|2
+----------------------------------------
+--
+-- ST_IsValidTrajectory
+--
+----------------------------------------
+
SELECT 'invalidTrajectory1', ST_IsValidTrajectory('POINTM(0 0 0)'::geometry);
SELECT 'invalidTrajectory2', ST_IsValidTrajectory('LINESTRINGZ(0 0 0,1 1 1)'::geometry);
SELECT 'invalidTrajectory3', ST_IsValidTrajectory('LINESTRINGM(0 0 0,1 1 0)'::geometry);
SELECT 'validTrajectory1', ST_IsValidTrajectory('LINESTRINGM(0 0 0,1 1 1)'::geometry);
SELECT 'validTrajectory2', ST_IsValidTrajectory('LINESTRINGM EMPTY'::geometry);
SELECT 'validTrajectory3', ST_IsValidTrajectory('LINESTRINGM(0 0 0,1 1 1,1 1 2)'::geometry);
+
+----------------------------------------
+--
+-- ST_PointOfClosestApproach
+--
+----------------------------------------
+
+-- Converging
+select 'pca1', ST_ClosestPointOfApproach(
+ 'LINESTRINGZM(0 0 0 0, 10 10 10 10)',
+ 'LINESTRINGZM(0 0 0 1, 10 10 10 10)');
+-- Following
+select 'pca2', ST_ClosestPointOfApproach(
+ 'LINESTRINGZM(0 0 0 0, 10 10 10 10)',
+ 'LINESTRINGZM(0 0 0 5, 10 10 10 15)');
+-- Crossing
+select 'pca3', ST_ClosestPointOfApproach(
+ 'LINESTRINGZM(0 0 0 0, 0 0 0 10)',
+ 'LINESTRINGZM(-30 0 5 4, 10 0 5 6)');
+-- Ticket #3136
+WITH inp as ( SELECT
+ 'LINESTRING M (0 0 80000002,1 0 80000003)'::geometry g1,
+ 'LINESTRING M (2 2 80000000,1 1 80000001,0 0 80000002)'::geometry g2 )
+SELECT 'pca#3136',
+ST_ClosestPointOfApproach(g2,g1), ST_ClosestPointOfApproach(g1,g2)
+FROM inp;