Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 2.2.2, 2.6-M0
-
Fix Version/s: None
-
Component/s: jdbc-oracle plugin
-
Labels:None
Description
Reported on the udig list...I then use the "Hole Cutter" to add a hole to a polygon (or move a vertex,
it doesn't matter) and press the COmmit button on the toolbar. Visibly the
edits disappear and the geometry returns to the original.
org.geotools.data.DataSourceException: SQL Exception writing geometry column
ORA-29877: failed in the execution of the ODCIINDEXUPDATE routine
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 243
And a bit further
I did a bit of mucking about with uDig and Oracle to find out what uDig is writing that is causing the mismatch in SRIDs.
I ascertained this:
1. You are doing an UPDATE using the primary key OID attribute (fine).
2. The geometry you are writing does not honor the SDO_SRID value in the original geometry replacing it with NULL.
What I did was
a. let uDig get the data it needed into memory.
b. Selected and editing my feature.
c. Went in to Oracle and killed the spatial index.
d. Pressed commit in uDig (the data is committed but, of course, the refresh of the display does not because there is not spatial index).
e. Checked what was committed:
select a.geom.sdo_srid,count
from parcel_drawing a
group by a.geom.sdo_srid;
GEOM.SDO_SRID COUNT
------------- --------
(null) 1
28356 1218
f. manually updated the NULL SDO_SRID value;
g. Rebuilt the spatial index
h. Refreshed uDig --> Bingo. The edit is there.
So, it looks like when you are updating an existing shape the code seems to NULL out the existing value.
Issue Links
- is depended upon by
-
UDIG-1509
Oracle DataStore does not supply SRID on update; resulting in exception writing geometry column
-