Skip to main content
Question

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

  • February 14, 2018
  • 4 replies
  • 29 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

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


david_r wrote:

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...


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings