In SDE.ST_GEOMETRY, we have a function called ST_PointN:
ST_PointN takes an ST_LineString and an integer index and returns a point that is the nth vertex in the ST_LineString's path.
sde.st_pointn (line1 sde.st_linestring, index integer)
Example:
SELECT gid, sde.st_astext (sde.st_pointn (ln1, 2)) The_2ndvertex FROM POINTN_TEST; GID The_2ndvertex ---- ----------------------------- 1 POINT (23.73 21.92) 2 POINT ZM (23.73 21.92 6.5 7.1)
Question:
Does Oracle's native datatype SDO_GEOMETRY have an equivalent function?
Related:
- Why does SHAPE.SDO_ORDINATES(1) work in PL/SQL, but not in SQL?
- Get X & Y coordinates from GEOM_SEGMENT_START_PT()
- Why does GEOM_SEGMENT_START_PT() return SDO_ORDINATE_ARRAY, not an SDO_POINT?
- Idea: Function to get a 2D line's startpoint (as SDO_POINT)
- Support extracting collection elements by index in SQL