Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SDO_GEOMETRY to WKT format issue

cd29b671-25e0-47ff-8e97-c85d9a3aa47cDec 24 2018 — edited Dec 26 2018

Hi everyone,

I had recently stumbled upon an issue with transforming geometries into WKT format.

Here is the sample query:

select

    SDO_GEOMETRY(2003, 4326, Null,

        SDO_ELEM_INFO_ARRAY(1,1003,3),

        SDO_ORDINATE_ARRAY(39, 116, 40, 117)).Get_WKT()

from dual;

It returns:

POLYGON ((39.0 116.0, 40.0 116.0, 40.0 117.0, 39.0 117.0, 39.0 116.0))

And i have some other servers where i run the same query and i am getting a different result:

POLYGON ((-141.0 64.0, -140.0 64.0, -140.0 63.0, -141.0 63.0, -141.0 64.0))

I assume there are some differences in SRID definition, since when i place null instead of 4326 it gives me the same result.

I tried to trace it but all the data i have found related to SRID definition looks the same.

Now i am lacking of ideas where to look at, would appreciate for any hint.

Thanks

Comments
Post Details
Added on Dec 24 2018
3 comments
2,517 views