Oracle Spatial Object Feature Representation
Features read from Oracle Spatial consist of a series of attribute values and geometry data.
In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Attributes), the Oracle Spatial module makes use of the following special attribute and trait names:
Attribute/Trait Name |
Contents |
---|---|
oracle_type |
This attribute stores the type of geometric entity stored within the feature. The valid values are:
|
oracle_srid |
For the Oracle Spatial Object reader, this attribute is set to the SRID value of the geometry being read. If the SRID value is null, oracle_srid is not set on the feature. The SRID value on the first feature read is used to look up a coordinate system in FME, which is then set on all the subsequent features read, even if their SRID values conflict with the first SRID value. For the Oracle Spatial Object writer, oracle_srid specifies the SRID of the geometry being written on a per-feature-type (table) basis. It overrides the coordinate system set on the writer. This attribute is not used by the Oracle Spatial Object writer when writing vector geometry. |
Coordsys |
This trait stores the FME coordinate system name that corresponds to the Oracle SRID. This is only present when Handle Multiple Spatial Columns is enabled. |
Features read from, or written to, Oracle Spatial also have an attribute for each column in the database table. The feature attribute name will be the same as the source or destination column name. The attribute and column names are case-sensitive.
Oracle Spatial’s object model allows each geometry to have a “point” location, in addition to any ordinates defining the geometry. It stores this information in a field named SDO_POINT within the geometry object.
If this field is not null in the Oracle Spatial geometry object, this location is stored on the FME feature using the following attributes or geometry traits:
Attribute/Trait Name |
Contents |
---|---|
oracle_sdo_point.x |
The first ordinate of the Oracle Spatial geometry’s |
oracle_sdo_point.y |
The second ordinate of the Oracle Spatial geometry’s |
oracle_sdo_point.z |
The third ordinate of the Oracle Spatial geometry’s |
Notice, however, that simple points are normally represented in Oracle Spatial geometry objects with an empty ordinate array, with the actual point location stored in the SDO_POINT
field. In this case, the FME feature will have a “point” geometry and will not contain the oracle_sdo_point
attributes. If the Oracle geometry has both an ordinate list defining a point and a defined SDO_POINT
field, the FME feature will contain both a point geometry and the required oracle_sdo_point
attributes.
Oracle Spatial Object structures each geometry object with zero or more elements, each with a specified numeric type. Usually these types represent an actual geometry type, such as “point” or “line”, but there is also a type defined as “unknown”. Unknown elements are ignored by the Oracle Spatial Object geometric computation procedures, and may be used by applications to store whatever numeric data they see fit to store.
FME can read and write a geometry’s unknown elements. It represents the unknown elements entirely with feature attributes, of the form oracle_unknown_element{m}.attrName, where m (m>=0) is the ordinal position of the element relative to the other unknown elements, and attrName has one of the following values.
Attribute Name |
Contents |
---|---|
interpretation |
The interpretation tells the application what kind of data is represented by the unknown element. This may be any integral value, and is not interpreted specially by FME or Oracle in any way. |
num_ordinates |
This specifies the number of ordinates that make up the element. The ordinates are stored in Oracle as a one-dimensional array of numbers. A given element may have zero or more ordinates associated with it. |
ordinate{m} |
This is the number at the given ordinate position (0 <= m <= (num_ordinates-1)). It can be any number representable in an Oracle NUMBER type. |
The unknown elements are given a sequence number among all of a given feature’s unknown elements, but are not given any hint as to their position relative to other elements in a geometry. That is, FME sees the elements as an array of information added to an Oracle geometry object, and pays no attention to where the elements are placed in relation to “real” geometric elements of the feature. When writing to Oracle Spatial objects, FME always places the unknown elements before all other elements in the geometry.
oracle_type: oracle_nil
Features with no coordinates are tagged with this value when reading or writing to or from Oracle Spatial Object.
oracle_type: oracle_point
Features tagged with this value consist of a single point or an aggregate of points. When the object model is being used, an aggregate or line geometry tagged as oracle_point will be written as a “point cluster” with one or more coordinates stored as actual ordinates in the point, rather than being written as a single coordinate stored in the output geometry object’s SDO_POINT field, or coerced to being an oracle_line.
Oracle's oriented points are also supported. In this case, the SDO_POINT field is set to null, and the orientation of the point is specified on the FME feature either as a set of three numbers describing the orientation in 3D space, or a single value describing the planar rotation, as summarized in the following table. Orientation will be read through geometry traits and attributes as per the chart below. Similarly, when writing, point orientation can be provided using either attributes or traits.
Attribute/Trait Name |
Contents |
---|---|
oracle_orientation |
The orientation of the point, expressed in degrees counter-clockwise from the positive X axis. When reading, this is an approximation of the orientation described by the (i,j,k) orientation vector. When writing, this value is used to compute an (i,j,0) unit vector on the horizontal plane, if no such (i,j,k) vector is defined on the feature being written. |
oracle_orient_i |
The “X axis” component of a vector describing the point’s orientation. This vector is normally a unit vector in 3D space. If the three components of the orientation vector are present on a feature being written, then the vector is used in place of any value present on the oracle_orientation attribute. |
oracle_orient_j |
The “Y axis” component of a vector describing the point’s orientation. The comments above for oracle_orient_i apply to this attribute as well. |
oracle_orient_k |
The “Z axis” component of a vector describing the point’s orientation. The comments above for oracle_orient_i apply to this attribute as well. |
oracle_type: oracle_line
Linear features are tagged with this value when reading or writing to or from Oracle Spatial. Both single part and aggregate linear features are supported.
Aggregates are written out as “multiline” geometry containing several linear elements, just as if the feature had been tagged with oracle_multiline. Any non-linear elements contained in the aggregate are discarded.
oracle_type: oracle_area
Area features are tagged with this value when reading or writing to or from Oracle Spatial. Both single part and aggregate area features are supported. An area feature may be either a polygon or a donut polygon. Note that checking is done to ensure that the area features adhere to the geometry rules of Oracle Spatial as they are loaded.
Aggregates are written out as “multipolygon” geometry containing several polygonal elements, just as if the feature had been tagged with oracle_multiline. Any non-polygonal elements contained in the aggregate are discarded.
oracle_type: oracle_arc
Arc features are tagged with this value when reading or writing to or from Oracle Spatial Object model. The arc is defined in the FME feature by a center point and a number of attributes to define the shape of the arc.
Attribute Name |
Contents |
---|---|
oracle_primary_radius | The length of the arc’s semi-major axis, measured in ground units. |
oracle_secondary_radius | The length of the arc’s semi-minor axis, measured in ground units. |
oracle_start_angle | How FME calculates start_angle and sweep_angle |
oracle_sweep_angle | How FME calculates start_angle and sweep_angle |
oracle_rotation | The rotation of the major axis. The rotation is measured in degrees counterclockwise from horizontal. |
oracle_type: oracle_rectangle
Oracle Spatial rectangle objects are represented in FME by closed polygons. When a rectangle is read, it is turned into a closed polygon feature. When a feature is written tagged with an oracle_rectangle type, its minimum bounding rectangle is computed, and the resulting lower-left and upper-right coordinates will form the ordinates for the Oracle geometry.
oracle_type: oracle_circle
Circle features are tagged with this value when reading or writing to or from Oracle Spatial Object. The circle is defined in the FME feature by a center point and an attribute to define the circle’s radius:
Attribute Name |
Contents |
---|---|
oracle_radius |
The length of the circle’s semi-major axis, measured in ground units. |
oracle_rotation |
The rotation of the major axis. The rotation is measured in degrees counterclockwise from horizontal. |
oracle_type: oracle_solid
Solid features are tagged with this value when reading or writing to or from Oracle Spatial Object model.
Solid features are supported only when writing to an Oracle Database version 11g or later. If the Oracle Spatial Object writer detects a version of Oracle Database older than version 11g, solid features will automatically be downgraded to a 2D representation prior to writing.
Oracle Spatial Object directly supports simple solids, composite solids and optimized solids.
For writing, all other types of solid geometries (e.g., extrusions) are decomposed into simple solids prior to writing.
oracle_type: oracle_surface
Surface features are tagged with this value when reading or writing to or from Oracle Spatial Object.
Surface features are supported only when writing to an Oracle Database version 11g or later. If the Oracle Spatial Object writer detects a version of Oracle Database older than version 11g, surface features will automatically be downgraded to a 2D representation prior to writing.
Oracle Spatial Object directly supports composite surfaces, 3D polygons and rectangles.
For reading, 3D polygons and rectangles are only read as surfaces if the Read 3D Polygons as Faces parameter is set to Yes.
For writing, all other types of surface geometries (for example, triangle fans or strips) are decomposed into composite surfaces prior to writing.
oracle_type: oracle_multipoint
Aggregate point features are tagged with this value when reading or writing to or from Oracle Spatial. When writing to Oracle, each element of the aggregate must be have a “point” geometry; others will simply be discarded before writing.
Oracle's oriented points are supported for each element of the point aggregate. On write, these can be specified on each point geometry as a trait. On read, each point geometry element in the multipoint will have the below geometry traits if the point has an orientation.
Trait Name |
Contents |
---|---|
oracle_orientation | The orientation of the point, expressed in degrees counter-clockwise from the positive X axis. When reading, this is an approximation of the orientation described by the (i,j,k) orientation vector. When writing, this value is used to compute an (i,j,0) unit vector on the horizontal plane, if no such (i,j,k) vector is defined on the feature being written. |
oracle_orient_i | The “X axis” component of a vector describing the point’s orientation. This vector is normally a unit vector in 3D space. If the three components of the orientation vector are present on a feature being written, then the vector is used in place of any value present on the oracle_orientation attribute. |
oracle_orient_j | The “Y axis” component of a vector describing the point’s orientation. The comments above for oracle_orient_i apply to this attribute as well. |
oracle_orient_k | The “Z axis” component of a vector describing the point’s orientation. The comments above for oracle_orient_i apply to this attribute as well. |
oracle_type: oracle_multiline
Aggregate linear features are tagged with this value when reading or writing to or from Oracle Spatial. When writing to Oracle, each element of the aggregate must be have a linear geometry; others will simply be discarded before writing.
oracle_type: oracle_multipoly
Aggregate polygonal features are tagged with this value when reading or writing to or from Oracle Spatial. When writing to Oracle, each element of the aggregate must be have a polygonal geometry; others will simply be discarded before writing.
oracle_type:oracle_multisolid
Aggregate solid features are tagged with this value when reading or writing to or from Oracle Spatial Object. When writing to Oracle, each element of the aggregate must have a solid geometry.
Solid features are supported only when writing to an Oracle Database version 11g or later. If the Oracle Spatial Object writer detects a version of Oracle Database older than version 11g, solid features will automatically be downgraded to a 2D representation prior to writing.
Oracle Spatial Object directly supports simple solids, composite solids and optimized solids.
For writing, all other types of solid geometries (for example, extrusions) are decomposed into simple solids prior to writing.
oracle_type:oracle_multisurface
Aggregate surface features are tagged with this value when reading or writing to or from Oracle Spatial Object. When writing to Oracle, each element of the aggregate must have a surface geometry.
Surface features are supported only when writing to an Oracle Database version 11g or later. If the Oracle Spatial Object writer detects a version of Oracle Database older than version 11g, surface features will automatically be downgraded to a 2D representation prior to writing.
Oracle Spatial Object directly supports composite surfaces, 3D polygons and rectangles.
For reading, 3D polygons and rectangles are only read as surfaces if the Read 3D Polygons as Faces parameter is set to Yes.
For writing, all other types of surface geometries (for example, triangle fans or strips) are decomposed into composite surfaces prior to writing.
oracle_type:oracle_collection
Aggregates containing heterogeneous collections of point, line and polygon features are tagged with this value when reading or writing to or from Oracle Spatial.