Requirements for Extracting Spatial Data for Bentley Map
The minimum requirements for Bentley Map to extract (import) spatial data from tables in Oracle Spatial or Locator are:
- Tables can have only one geometry column (type: SDO_GEOMETRY);
- Geometry data in a table must be restricted to one geometry type (SDO_GTYPE) only;
To determine if a table contains more than one geometry type, use the following query:
SELECT t.<geometry column>.SDO_GTYPE, COUNT(*) FROM<table name>t GROUP BY t<geometry column>.SDO_GTYPE;
If the query returns only one column, the table meets the one geometry type requirement for Bentley Map.
- Geometry type support is restricted to point, multi point, curve, multi curve, polygon and multi polygon types;
- The geometry column needs to have a spatial index, with the geometry type explicitly defined.
The following is an example of a CREATE INDEX statement with an explicit geometry type:
CREATE INDEX customers_sidx ON customers(cust_geo_location) INDEXTYPE IS mdsys.spatial_index PARAMETERS ('layer_gtype=POINT');
To be able to create a spatial index on a table it needs to be registered in the appropriate Oracle metadata view (typically user_sdo_geom_metadata).
The following is an example of the entry used to be able to successfully execute the CREATE INDEX statement listed above:
INSERT INTO user_sdo_geom_metadata (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID) VALUES ('CUSTOMERS', 'CUST_GEO_LOCATION', SDO_DIM_ARRAY (SDO_DIM_ELEMENT('LONG', -180.0, 180.0, 0.5), SDO_DIM_ELEMENT('LAT', -90.0, 90.0, 0.5)), 8307);
Any table with spatial data in Oracle that abides to the requirements listed in this section, is available for import into Bentley Map using the ImportAdd Oracle (read-only) option in the Interoperability dialog.