Regarding the below test:
with data as (select sdo_lrs.geom_segment_start_pt(
sdo_geometry('linestring(10 10, 20 20, 30 30)')
) as shape from dual)
select
sdo_util.get_coordinate(shape, 1).sdo_point.x as vertex_1_x,
sdo_util.get_coordinate(shape, 2).sdo_point.x as vertex_2_x
from
data;
VERTEX_1_X VERTEX_2_X
---------- ----------
10 10
Why does GET_COORDINATE(GEOM_SEGMENT_START_PT(shape),2)
return the first vertex?
If anything, I would have thought it would return null or an error, since the second vertex doesn't exist in that startpoint geometry.
And to be honest, I don't understand why ...(shape,
**1**).sdo_point.x
would work in the first place, since the geometry doesn't have an sdo_point, it only has an sdo_ordinate_array:
MDSYS.SDO_GEOMETRY(2001, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1, 1), MDSYS.SDO_ORDINATE_ARRAY(10, 10))