| 248 | | -------------------------------- |
| 249 | | -- LRS functions |
| 250 | | -------------------------------- |
| 251 | | |
| 252 | | -- No M value |
| 253 | | select '2d',asewkt(locate_along_measure('POINT(1 2)', 1)); |
| 254 | | select '3dz',asewkt(locate_along_measure('POINT(1 2 3)', 1)); |
| 255 | | |
| 256 | | -- Points |
| 257 | | select 'PNTM_1',asewkt(locate_along_measure('POINTM(1 2 3)', 1)); |
| 258 | | select 'PNTM_2',asewkt(locate_along_measure('POINTM(1 2 3)', 3)); |
| 259 | | select 'PNTM_3',asewkt(locate_between_measures('POINTM(1 2 3)', 2, 3)); |
| 260 | | select 'PNTM_4',asewkt(locate_between_measures('POINTM(1 2 3)', 3, 4)); |
| 261 | | select 'PNTM_5',asewkt(locate_between_measures('POINTM(1 2 4.00001)', 3, 4)); |
| 262 | | |
| 263 | | -- Multipoints |
| 264 | | select 'MPNT_1',asewkt(locate_between_measures('MULTIPOINTM(1 2 2)', 2, 5)); |
| 265 | | select 'MPNT_2', asewkt(locate_between_measures('MULTIPOINTM(1 2 8, 2 2 5, 2 1 0)', 2, 5)); |
| 266 | | select 'MPNT_3', asewkt(locate_between_measures('MULTIPOINTM(1 2 8, 2 2 5.1, 2 1 0)', 2, 5)); |
| 267 | | select 'MPNT_4', asewkt(locate_between_measures('MULTIPOINTM(1 2 8, 2 2 5, 2 1 0)', 4, 8)); |
| 268 | | |
| 269 | | |
| 270 | | -- Collections |
| 271 | | select 'COLL_1', asewkt(locate_between_measures('GEOMETRYCOLLECTION(MULTIPOINTM(1 2 8, 2 2 5.0, 2 1 0),MULTIPOINT(0 0 1))', 2, 5)); |
| 272 | | |
| 273 | | -- Linestrings |
| 274 | | select 'LINEZM_1', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 10)', 2, 18)); |
| 275 | | select 'LINEZM_2', asewkt(locate_between_measures('LINESTRING(0 10 0 0, 0 0 100 10)', 2, 18)); |
| 276 | | select 'LINEZM_3', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 10, 10 0 0 0)', 2, 18)); |
| 277 | | select 'LINEZM_4', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 20, 10 0 0 0)', 2, 18)); |
| 278 | | select 'LINEZM_5', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 20, 0 10 10 40, 10 0 0 0)', 2, 18)); |
| | 248 | -- Drop test table |
| | 249 | DROP table test; |