Re: inserting features with WFS-T into OracleSp atial data store fails because of incorrect SRID

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: inserting features with WFS-T into OracleSp atial data store fails because of incorrect SRID

Paul, Michael-2
Hi folks,

with the hints posted previously to this list, I have generated a small
patch that is working OK for my purposes. To explain, whenever a geometry
has set an SRID of 0 (which does not exist in Oracle), now the code is
assigning the NULL value for the SRID. Hence, the fix to me works fine as
the SRID column contains NULL within user_sdo_geom_metadata view in our
environment. I assume that most other people will also find a null value
there, as most tools which load data into Oracle Spatial do not assign any
SRID and leave this column NULL.

A real bug fix should obtain the correct SRID value from the
user_sdo_geom_metadata view and reproject the geometry to be
inserted/updated if necessary.

Please find attached a patched .jar file which I am currently using for
geoserver + Oracle Spatial, as well as the changed source file (the changed
line is 130).
Diff:
130c130
<         NUMBER SDO_SRID = srid == SDO.SRID_NULL ? null :
---
>         NUMBER SDO_SRID = (srid == SDO.SRID_NULL || srid == 0) ? null :

Regards,
 
Michael.


GeometryConverter.java (14K) Download Attachment
gt2-oracle-spatial-2.2-patched.jar (45K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: inserting features with WFS-T into OracleSp atial data store fails because of incorrect SRID

Chris Holmes-2
Awesome, thanks!

What version of GeoTools is this against?  2.2.x?

Paul, Michael wrote:

> Hi folks,
>
> with the hints posted previously to this list, I have generated a small
> patch that is working OK for my purposes. To explain, whenever a geometry
> has set an SRID of 0 (which does not exist in Oracle), now the code is
> assigning the NULL value for the SRID. Hence, the fix to me works fine as
> the SRID column contains NULL within user_sdo_geom_metadata view in our
> environment. I assume that most other people will also find a null value
> there, as most tools which load data into Oracle Spatial do not assign any
> SRID and leave this column NULL.
>
> A real bug fix should obtain the correct SRID value from the
> user_sdo_geom_metadata view and reproject the geometry to be
> inserted/updated if necessary.
>
> Please find attached a patched .jar file which I am currently using for
> geoserver + Oracle Spatial, as well as the changed source file (the changed
> line is 130).
> Diff:
> 130c130
> <         NUMBER SDO_SRID = srid == SDO.SRID_NULL ? null :
> ---
>>         NUMBER SDO_SRID = (srid == SDO.SRID_NULL || srid == 0) ? null :
>
> Regards,
>  
> Michael.
>
>
>
> !DSPAM:1003,449fc7f033341362196140!
>
>
> ------------------------------------------------------------------------
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> !DSPAM:1003,449fc7f033341362196140!
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> !DSPAM:1003,449fc7f033341362196140!
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

cholmes.vcf (281 bytes) Download Attachment