Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 9
Registered: ‎01-18-2017

Insert Geometry Data from XML into Oracle

Hi, we have an urgent MAJOR problem.

 

we have some unsucessful data syncronization from OFFLINE to ONLINE via Geomedia Smart Client.

as expected, Smart Client creates an XML file for each objects which were unsucessfully transferred.

 

how do we insert these data from XML into oracle, especially the Geometry part (because its a bunch of strings)?

 

some sample of the XML is attached.

 

please help

 

thank you.

 

<Geometry>

<Identifier xsi:type="xs:long" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http:...4064057</Identifier><GdoGeometry>wv/SD7yMzxGr3ggANgG3aQIAAADsUbheufYmQS/dJAZTyBZBAAAAAAAAAAB7pSxl9/YmQTqSy3OIyBZBAAAAAAAAAAA=</GdoGeometry>

Occasional Contributor
Posts: 9
Registered: ‎01-18-2017

Insert Geometry Data from XML into Oracle

Hi, we have an urgent MAJOR problem.

 

we have some unsucessful data syncronization from OFFLINE to ONLINE via Geomedia Smart Client.

as expected, Smart Client creates an XML file for each objects which were unsucessfully transferred.

 

how do we insert these data from XML into oracle, especially the Geometry part (because its a bunch of strings)?

 

some sample of the XML is attached.

 

please help

 

thank you.

 

<Geometries>

<Geometry>

<Identifier xsi:type="xs:long" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http:...4064057</Identifier><GdoGeometry>wv/SD7yMzxGr3ggANgG3aQIAAADsUbheufYmQS/dJAZTyBZBAAAAAAAAAAB7pSxl9/YmQTqSy3OIyBZBAAAAAAAAAAA=</GdoGeometry><Attributes><KeyValuePair><Key>ACTUAL_LENGTH</Key><Value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>

Occasional Contributor
Posts: 9
Registered: ‎01-18-2017

Re: Insert Geometry Data from XML into Oracle

initially when the user tries to sync data from offline to online, this error message pops out.

since we already knew the root cause of this issue,

we would like to insert all the data back.

 

however, since the data is already converted into xml,

the cache file is no longer there, so we cannot insert the data from the cache file into oracle

 

please assist,

 

TQ

Highlighted
Regular Contributor
Posts: 204
Registered: ‎05-25-2016

Re: Insert Geometry Data from XML into Oracle

Hi

 

I guess the geometry string in your XML file the "ASCII representation" of your blob (binary geometry data value).

 

You can try to convert the the geometry value in the XML file from string to binary and save the binary value as blob in your geometry column.

 

Maybe it works.

 

Regards,

hesrah

Occasional Contributor
Posts: 9
Registered: ‎01-18-2017

Re: Insert Geometry Data from XML into Oracle

hi Hesrah,

 

thanks for the reply.

 

so i guess, i convert this to "01110111 01110110 00101111 01010011 01000100 00110111 01111001 01001101 01111010 01111000 01000111 01110010 00110011 01100111 01100111 01000001 01001110 01100111 01000111 00110011 01100001 01010001 01010001 01000001 01000001 01000001 01000001 01100001....' right?

 

our current geometry column is not a BLOB, but a SDO_GEOMETRY column...

 

does this mean I have to use a SDO_UTIL to convert it to something that I can save to the column?

Occasional Contributor
Posts: 9
Registered: ‎01-18-2017

Re: Insert Geometry Data from XML into Oracle

Actually, what kind of data type is this string anyway? is it an encrypted hash, or an ascii?

I have no idea what this is, let alone how to convert it to geometry.

 

the only thing i know at the moment is it is generated from H2DB, and it is stored under GdoGeometry

Example 1:
wv/SD7yMzxGr3ggANgG3aQIAAADsUbheufYmQS/dJAZTyBZBAAAAAAAAAAB7pSxl9/YmQTqSy3OIyBZBAAAAAAAAAAA=

 

Example 2:

yP/SD7yMzxGr3ggANgG3aYw5UATx9iZBeKaTOU7JFkHNzMzMzMwiQAAAAAAAAPA/AAAAAAAAAAAAAAAAAAAAAA==

 

Example 3:

yP/SD7yMzxGr3ggANgG3aUwqGrA29yZBDinRh+bIFkEAAAAAAAAyQAAAAAAAAPA/AAAAAAAAAAAAAAAAAAAAAA==

Regular Contributor
Posts: 204
Registered: ‎05-25-2016

Re: Insert Geometry Data from XML into Oracle

Hi

 

I can't say exactly what the ascii value is. My interpretation was just a suggestion.

Maybe it's a hash. If so, you lost the geometry in the XML file in fact ...

 

My suggestion was to convert the ascii value to convert a binary value. You can't do that in the XML file (an XML file is always text/string/ascii). You have to do that with a bit stream by code. I think there is no other way. Maybe someone else has a better idea.

 

Best regards,

hesrah 

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.