Problem loading oriented point geometry (Oracle DB)

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

Problem loading oriented point geometry (Oracle DB)

Daniel Beer

Hi Karel,

 

we have switched from Hibernate Spatial 1.0 to 4.0 recently.

There are some Geometries in our Oracle DB created by third party tools.

After the upgrade to 4.0 we have problems especially with “oriented points”, see: http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm#CBBIGEFH.

Here is an example Geometry: MDSYS.SDO_GEOMETRY(2001,25833,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,0),MDSYS.SDO_ORDINATE_ARRAY(373468.985405996,5900452.11665327,1,0))

 

We would like to ignore the orientation and let Hibernate Spatial interpret this type of geometry as ordinary point (as this was the case in the 1.0 version). But unfortunately it tries to create a com.vividsolutions.jts.geom.Point with 2 coordinates (instead of one) which in turn lets the org.hibernate.spatial.dialect.oracle.SDOGeometryValueExtractor#convertSDOPoint() method fail (due to an AssertionFailedException thrown by the Point constructor).

 

Is there anything we can do about this?

 

Regards,

 

Daniel


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading oriented point geometry (Oracle DB)

Karel Maesen
Administrator
Hi Daniel,

I’ll have a look to see if I can fix this easily, and backport to HS 4.x. Note that I don’t plan any new releases for HS4 so you’ll probably need to build this yourself.

Regards,

Karel


> On 12 Oct 2015, at 11:51, Daniel Beer <[hidden email]> wrote:
>
> Hi Karel,
>  
> we have switched from Hibernate Spatial 1.0 to 4.0 recently.
> There are some Geometries in our Oracle DB created by third party tools.
> After the upgrade to 4.0 we have problems especially with “oriented points”, see:http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm#CBBIGEFH.
> Here is an example Geometry: MDSYS.SDO_GEOMETRY(2001,25833,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,0),MDSYS.SDO_ORDINATE_ARRAY(373468.985405996,5900452.11665327,1,0))
>  
> We would like to ignore the orientation and let Hibernate Spatial interpret this type of geometry as ordinary point (as this was the case in the 1.0 version). But unfortunately it tries to create a com.vividsolutions.jts.geom.Point with 2 coordinates (instead of one) which in turn lets the org.hibernate.spatial.dialect.oracle.SDOGeometryValueExtractor#convertSDOPoint() method fail (due to an AssertionFailedException thrown by the Point constructor).
>  
> Is there anything we can do about this?
>  
> Regards,
>  
> Daniel
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem loading oriented point geometry (Oracle DB)

Daniel Beer
In reply to this post by Daniel Beer
Hi Karel,

thanks for your quick reply.
Building the library should be no problem. Will there be an issue in JIRA related to this problem? Otherwise, how can I tell if a fix is available?

May I point out another small problem:
We have extended the org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect to register some additional functions. Unfortunately our custom Dialect is not going to be used, because org.hibernate.spatial.integration.SpatialDialectFactory will create a new OracleSpatial10gDialect as long as the original dialect is an instance of OracleSpatial10gDialect.
A solution would be to change the check in SpatialDialectFactory to
        if (OracleSpatial10gDialect.class.equals(dialect.getClass())) {
What do you think?

Regards,

Daniel

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Karel Maesen
Gesendet: Montag, 12. Oktober 2015 21:32
An: Hibernate Spatial Users Discussion
Betreff: Re: [hibernatespatial-users] Problem loading oriented point geometry (Oracle DB)

Hi Daniel,

I’ll have a look to see if I can fix this easily, and backport to HS 4.x. Note that I don’t plan any new releases for HS4 so you’ll probably need to build this yourself.

Regards,

Karel


> On 12 Oct 2015, at 11:51, Daniel Beer <[hidden email]> wrote:
>
> Hi Karel,
>  
> we have switched from Hibernate Spatial 1.0 to 4.0 recently.
> There are some Geometries in our Oracle DB created by third party tools.
> After the upgrade to 4.0 we have problems especially with “oriented points”, see:http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm#CBBIGEFH.
> Here is an example Geometry: MDSYS.SDO_GEOMETRY(2001,25833,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,0),MDSYS.SDO_ORDINATE_ARRAY(373468.985405996,5900452.11665327,1,0))
>  
> We would like to ignore the orientation and let Hibernate Spatial interpret this type of geometry as ordinary point (as this was the case in the 1.0 version). But unfortunately it tries to create a com.vividsolutions.jts.geom.Point with 2 coordinates (instead of one) which in turn lets the org.hibernate.spatial.dialect.oracle.SDOGeometryValueExtractor#convertSDOPoint() method fail (due to an AssertionFailedException thrown by the Point constructor).
>  
> Is there anything we can do about this?
>  
> Regards,
>  
> Daniel
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users