We have a very complicated setup for a project we are doing, and it involves 40+ developers and two oracle databases, one with sde and one only with oracle spatial and it's quite big.

We'll here are my issues:

In the SDE database, ArcSDE is creating my linear tables as Linestrings, while in the other Oracle database, we have Multilinestring tables. I'm not sure how that got by, and there is a ton of code built on top of the oracle only schema.

How can I transform a simple linestring in a multilinestring? Here is what we've tried:

  1. Using oracle append function to see if it returned a multi* geometric field. it does return a multi* geometry, but some parameters in the metadata are different
  2. using sdelayer -o delete and sdelayer -o register to force a multilinestring. The procedure was fine, but even after new inserts, the oracle db is still seeing linestrings.
  3. Merging two geometries inside arcgis. Still linesting geometry.

Any thoughts? Hacks? Solutions?

Changing the datamodel or code, specially code inside our oracle only db is an issue. Not possible.

Thanks for your attention and insights!


  • Is this actually causing a problem? In Oracle, when a spatial index is configured explicitly for multi-part lines or polygons, it is compatible with single part geometries. It is going the other way around that causes issues. – Jordan Parmer Mar 21 '11 at 20:31

Have you checked the sdo_gtype? This is probably why Oracle still sees linestrings? Assuming your table is called my_lines with a spatial column named shape you can run:

select a.shape.sdo_gtype from my_lines a group by a.shape.sdo_gtype;

This should give you the sdo_gtype(s) for your shapes. I suspect it would be 2001 You can then run the following to set the gtype to 2006 (multilinestring):

UPDATE dummy a SET a.shape.sdo_gtype = '2006' WHERE a.shape.sdo_gtype = '2001'

  • This solved our issues. We eventually figured it out, but thanks for replying mapoholic! – George Silva Jul 23 '11 at 17:59

Have you tried using SDO_GEOM.SDO_UNION instead of SDO_UTIL.APPEND?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.