The issue
We have some Oracle feature classes with text geometry created in GeoMedia and we want to use them in M.App Enterprise. Unfortunately the Studio doesn't recognize the tables with text geometries. Is there a way to import them?
Explanation
There are two folds of this problem:- Oracle's SDO_GTYPE doesn't know text geometries
- M.App Enterprise supports only a standardized OGC WKT geometry formats
Solution
The most effective approach is to decode the SDO_GEOMETRY field directly on the database level. For such we need to define specific functions and create extra columns in a database view that will contain the text data and additional information such as orientation. Attached is a set of 4 functions created for Oracle database- Getcustomgeominfo - returns the label from the source table geometry
- GetOrientationFromGMText - returns the text orientation from the source table geometry (it allows to directly use the value in MAE style as soon as the style definition doesn't support expressions but only attribute values)
- Bin2Dec and Dec2Bin - helper functions used in Getcustomgeominfo to execute conversions between binary and numeric formats
After having the functions above available in your database, you can create a view like this:
CREATE OR REPLACE VIEW "SCHEMA_NAME"."VIEW_NAME"
("PRIMARY_KEY_NAME", "GEOMETRY_NAME", "LABEL", "ORIENTATION") AS
SELECT
GID,
SDO_UTIL.EXTRACT(GEOMETRY_NAME, 1) AS GEOMETRY_NAME,
SCHEMA_NAME.Getcustomgeominfo(GEOMETRY_NAME) AS LABEL,
SCHEMA_NAME.GetOrientationFromGMText(GEOMETRY_NAME) AS ORIENTATION
FROM
SCHEMA_NAME.SOURCETABLE_NAME;
Keep in mind to create an entry in the MDSYS table referencing the geometry of the VIEW in order to be able to import the view in M.App Enterprise Studio.
After the import is done, you can use the LABEL and ORIENTATION columns in a Style Editor.