Friday, January 25, 2008

Smallworld/Oracle InSync and point/text orientation

I recently had the opportunity to set up a Smallworld->Oracle InSync process with an Oracle 10 XE Locator (subset of Oracle Spatial) database. After the process had been running successfully for some time, I discovered that the point and text geometries were not retaining their orientation values during the InSync run.

It turns out that you have to explicitly tell InSync (via the oracle_objects_dataset.dataset_instance_metadata shared constant) that you want text and/or points to retain their orientation.

An example of the parameters in the context of the dataset_instance_metadata...

property_list.new_with( :customer_oracle,
property_list.new_with( <other_properties>,
) ),
:private )

I would have thought that the default should be to always include oriented points and texts. But short of patching the InSync code, you will need to be aware of this unintuitive assumption of orientations and explicitly set the property to _true.

One other note about text geometry. While InSync allows you to set up a field mapping between a Smallworld text geometry and an Oracle geometry field, there is no functionality to store the actual Smallworld text geometry character string in the Oracle geometry field. All that gets copied into Oracle is the text location (and possibly orientation). If you want to get an actual character string to appear on the map in Oracle you will need to make use of Oracle text labelling at that "text" location. You would typically use the Oracle Map Builder application to configure what string is drawn at the "text" location.


Ary Sucaya said...

in what field (in oracle table) does the orientation stored? Does it mean that i have to define sdo_ordinates instead of sdo_point to store the coordinate and orientation? And how about owm som? is it compatible?

Anonymous said...

How to store smallworld data into oracle spatial. Are you have any document regard this?