我正在尝试使用两个游标来查找 2 个不同的交点,然后使用这两个交点来查找它们之间的差异,并将其作为几何对象插入到新表中。我不确定我是否正确使用了这些游标,但我想以最有效的方式执行此操作。
CREATE OR REPLACE PROCEDURE outputint
is
CURSOR findint1 IS
select sdo_geom.sdo_intersection
(a.geometry, b.geom, 0.05)
from OTTAWACOLLECTOR_NAD a,
OTTAWAPROVRDS_LRS b
where a.road_name = 'KENT'
AND b.rdnumber = '417';
CURSOR findint2 IS
select sdo_geom.sdo_intersection
(a.geometry, b.geom, 0.05)
from OTTAWACOLLECTOR_NAD a,
OTTAWAPROVRDS_LRS b
where a.road_name = 'METCALFE'
AND b.rdnumber = '417';
begin
UPDATE closedrds
set GEOMETRY = SDO_GEOM.SDO_DIFFERENCE(
findint1, findint2)
where rd_id = 1;
end outputint;