Updating geometry fails to supply SRID; resulting in exception writing geometry
column
--------------------------------------------------------------------------------------
Key: GEOT-2476
URL: http://jira.codehaus.org/browse/GEOT-2476
Project: GeoTools
Issue Type: Bug
Components: data oraclespatial
Affects Versions: 2.6-M0, 2.2.2
Reporter: Jody Garnett
Assignee: Andrea Aime
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.
{panel}
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
{panel}
And a bit further
{panel}
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.
{panel}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel