My Oracle Support Banner

SDO_LRS.OFFSET_GEOM_SEGMENT Generating Extra Vertices (Doc ID 1573476.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

Having this table and row:

create table rob_lrs ( objectid integer not null primary key, shape mdsys.sdo_geometry );

delete from rob_lrs;

delete USER_SDO_GEOM_METADATA
where table_name = 'ROB_LRS';

insert into user_sdo_geom_metadata
values ( 'ROB_LRS', 'SHAPE',
  mdsys.sdo_dim_array(
  mdsys.sdo_dim_element('X', 96.8172423333333, 154.013443533333, 0.05),
  mdsys.sdo_dim_element('Y', -43.5514469333333, -10.6833772, 0.05),
  mdsys.sdo_dim_element('M', 0, 100000, 0.005)), 4283 );
 
insert into rob_lrs
values ( 1, mdsys.sdo_geometry( 3302, 4283, null, mdsys.sdo_elem_info_array(1,2,1),
mdsys.sdo_ordinate_array(116.881371348821, -33.0340217026591, 0, 116.882907922735, -33.0327522450146, 200 ) ));
commit;


*** This query shows the SDO_LRS.OFFSET_GEOM_SEGMENT generating extra vertices: ***


select SDO_LRS.OFFSET_GEOM_SEGMENT(shape, diminfo, 0, 200, 5, 'arc_tolerance=0.05' ) from rob_lrs,

user_sdo_geom_metadata
where table_name = 'ROB_LRS'
and objectid = 1;

SDO_LRS.OFFSET_GEOM_SEGMENT(SHAPE,DIMINFO,0,200,5,'ARC_TOLERANCE=0.05')(SDO_GTYP
--------------------------------------------------------------------------------
SDO_GEOMETRY(3302, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(
116.881329, -33.033994, 0, 116.881334, -33.03399, .670351106, 116.88287, -33.032
72, 199.403585, 116.882876, -33.032717, 200))

As you can see the output has two extra vertices, to see it more clear:

with lrs as (
select SDO_LRS.OFFSET_GEOM_SEGMENT(shape, diminfo, 0, 200, 5, 'unit=M arc_tolerance=0.05' ) shape from rob_lrs,

user_sdo_geom_metadata
where table_name = 'ROB_LRS'
)
select t.id, t.x, t.y, t.z
from lrs, table(sdo_util.getvertices(lrs.shape)) t;

  ID X Y Z
---------- ---------- ---------- ----------
  1 116.881329 -33.033994 0
  2 116.881334 -33.03399 .670351106
  3 116.88287 -33.03272 199.403585
  4 116.882876 -33.032717 200


What is expected is to have ONLY Start point and End point, like this:

  ID X Y Z
---------- ---------- ---------- ----------
  1 116.881329 -33.033994 0
  2 116.882876 -33.032717 200

Without the extra two vertices in the middle.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.