Skip to main content
Solved

WKB to SDO_Geometry not working correctly with "Multipolygons"

  • March 19, 2020
  • 4 replies
  • 105 views

thomastupuivao
Contributor
Forum|alt.badge.img+7

I have a "mapinfo" table that I'm trying to load into a oracle DB with SDO_Geometry. My license doesn't let me create a writer in FME as an Oracle Spatial table. So my workaround is to add the tables as "oracle non-spatial" tables. This works fine for address points but when I run the following SQL;

This updates successfully. The issues is when I check in "Data Inspector" if its saved correctly (for this particular record which is a multipolygon).

 

I get only one of the polygon objects returning;

Best answer by steveatsafe

Hi @thomastupuivao,

Could you try this SQL instead?

 

UPDATE test_postcode SET geoloc = sdo_geometry(wkb,335872);
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

steveatsafe
Safer
Forum|alt.badge.img+13
  • Safer
  • 422 replies
  • Best Answer
  • March 26, 2020

Hi @thomastupuivao,

Could you try this SQL instead?

 

UPDATE test_postcode SET geoloc = sdo_geometry(wkb,335872);

thomastupuivao
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 15 replies
  • March 26, 2020

Hi @thomastupuivao,

Could you try this SQL instead?

 

UPDATE test_postcode SET geoloc = sdo_geometry(wkb,335872);

hi @steveatsafe, that worked!! thanks for that! appreciate it.


steveatsafe
Safer
Forum|alt.badge.img+13
  • Safer
  • 422 replies
  • March 26, 2020

hi @steveatsafe, that worked!! thanks for that! appreciate it.

Awesome!!


steveatsafe
Safer
Forum|alt.badge.img+13
  • Safer
  • 422 replies
  • March 31, 2020

hi @steveatsafe, that worked!! thanks for that! appreciate it.

@thomastupuivao,

A couple of other things for your Oracle Database:

Make sure spatial_vector_acceleration=true.

What database release are you running? You might want to see if you are on the latest spatial merge patch.

Also, in case you didn't know - Spatial and Graph is now included in the database at no extra cost (as of Dec 2019).