Chris,
Thank You for the hints. I will see if I can do something about it, but it will take some time.
If I can solve the problem, I will send You the changes.
Gerhard
--
Gerhard Sommer
Magistrat Wien (MA 14-ADV), Rathausstraße 1, 1082 Wien, Austria
E-Mail: som@anonymised.com
Tel: +43 (1) 4000 91326
Fax: +43 (1) 4000 99 91326
-----Original Message-----
From: Chris Holmes *EXTERN* [mailto:cholmes@anonymised.com]
Sent: Thursday, June 08, 2006 9:52 PM
To: Sommer Gerhard
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] inserting features with WFS-T
into Oracle Spatial data store fails because of incorrect SRIDYes, not only is it desired to go back to trunk, but I
probably wouldn't
give you help if you weren't going to contribute it back.Ok, the code is all in GeoTools. The two classes are:
http://svn.geotools.org/geotools/branches/2.2.x/plugin/oracles
patial/src/org/geotools/data/oracle/OracleFeatureWriter.javaand
http://svn.geotools.org/geotools/branches/2.2.x/plugin/oracles
patial/src/org/geotools/data/oracle/sdo/GeometryConverter.javaI don't have the time to dig in to the exact solution, but I can give
you a few hints. The function SDO.toSDO(geometry) tries to
extract the
srid from the geometry itself. The problem is that the SRID
number is
usually not set on the JTS geometry, because it's relatively
meaningless.So the first thing to try would be to get the proper srid.
You can get
it from the queryData's featureTypeInfo I think. You'll have
to dig in
to the parent classes, more in main module, the
org.geotools.data.jdbc
package and org.geotools.data.After you get the SRID, you can try just setting it on the
geometry. If
that doesn't work you could redo that toSDO function to take an SRID.hope this helps, if you need more help I can try to find some
more time
to dig in to it.Chris
Sommer Gerhard wrote:
> Hello Chris,
>
> Thank You for this information.
>
> I am a C# developer and do not know much very much about
Java, but I am sure that I can do it, if You can show me,
where to look in the code. But the change should go back
somehow to the trunk of GeoServer (or GeoTools?), so that
others can profit from the bug fix too and I do not have to
do the same changes in the next version of GeoServer again.
As I am new to GeoServer, I do not know´, how to contribute
or if this is possible or desired by the developers at all.
>
> Thanks,
> Gerhard
> --
> Gerhard Sommer
> Magistrat Wien (MA 14-ADV), Rathausstraße 1, 1082 Wien, Austria
> E-Mail: som@anonymised.com
> Tel: +43 (1) 4000 91326
> Fax: +43 (1) 4000 99 91326
>
>
>> -----Original Message-----
>> From: Chris Holmes *EXTERN* [mailto:cholmes@anonymised.com]
>> Sent: Wednesday, June 07, 2006 7:04 PM
>> To: Sommer Gerhard
>> Cc: geoserver-users@lists.sourceforge.net
>> Subject: Re: [Geoserver-users] inserting features with WFS-T
>> into Oracle Spatial data store fails because of incorrect SRID
>>
>> The Oracle Datastore hasn't had as much QA as PostGIS for example.
>> There's likely a bug in the code. If you're able to get in
>> to the Java
>> I'm happy to point you where to look to fix the problem.
I doubt it
>> should be that hard to fix...
>>
>> Chris
>>
>> Sommer Gerhard wrote:
>>> Hello,
>>>
>>> I am currently evaluating, if GeoServer (1.3.1) WFS-T can
>> be used to edit data in Oracle Spatial (10g) feature types.
>>> My feature type is in EPSG:31286 coordinate system, but
>> GeoServer seems to always insert features with Oracle SRID 0
>> into the Oracle Spatial layer.
>>> SRID = 0 is not defined in the USER_SDO_GEOM_METADATA
>> table. Therefore, if I try to create a spatial index, this is
>> not possible as the SRID values differ (I have 31286 in
>> USER_SDO_GEOM_METADATA, corresponding to the EPSG code of my
>> data). On the other hand, if I already have a spatial index
>> on my data and try to insert geometry using GeoServer, I also
>> get an the error message, that SRID of the geometry does not
>> match the SRID of USER_SDO_GEOM_METADATA.
>>> What can I do to solve this problem? Or is this a bug in
>> the current GeoServer version?
>>> Best Regards,
>>> Gerhard
>>> --
>>> Gerhard Sommer
>>> Magistrat Wien (MA 14-ADV), Rathausstraße 1, 1082 Wien, Austria
>>> E-Mail: som@anonymised.com
>>> Tel: +43 (1) 4000 91326
>>> Fax: +43 (1) 4000 99 91326
>>>
>>>
>>>
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>>
>>>
>> --
>> Chris Holmes
>> The Open Planning Project
>> http://topp.openplans.org
>>
>
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:1003,4487d778202316309890654!
>--
Chris Holmes
The Open Planning Project
http://topp.openplans.org