Skip to main content
Question

How do i extract geometry saves to a long raw column in oracle?

  • February 14, 2018
  • 4 replies
  • 61 views

Hi all the data in the column looks like its in a binary format but everything i try fails, please help. Here is an example of a record. 30303130010000000700000075B5157B9CB80F4187EB51B8CEEA08414282E24755B90F41EE51B81ED9EA0841D36F5F477DB90F41EE51B81ED9EA084132772DE1C6B90F41808CB9EBD9EA084132772DE1C6B90F41F6FDD4B882EA0841E27A14AE9BB80F41AB13D0847FEA084175B5157B9CB80F4187EB51B8CEEA08410000000000

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • February 14, 2018

Is this Oracle spatial? If so, you can use the built-in function TO_WKTGEOMETRY() to convert the geometry to e.g. WKT:

select SDO_UTIL.TO_WKTGEOMETRY(shape) from my_table;

More info in the Oracle docs: https://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_util.htm#SPATL180


  • Author
  • February 14, 2018

Is this Oracle spatial? If so, you can use the built-in function TO_WKTGEOMETRY() to convert the geometry to e.g. WKT:

select SDO_UTIL.TO_WKTGEOMETRY(shape) from my_table;

More info in the Oracle docs: https://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_util.htm#SPATL180

Hi david_r

 

I'm not sure if its oracle spatial, its an old proprietary system which has no documentation.  I tried your sql and get an error, "illegal use of LONG datatype".

 

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 14, 2018

geometry replacer with encoded polyline yields a result, using your sample.

Other settings yield error.


lottegis
Forum|alt.badge.img+1
  • February 15, 2018

To start, are you able to view the geometry of what is coded in binary? Then we can figure out writing to Oracle...