I have been playing around with Bentley Map Enterprise v8i (SS2) with our Oracle Server. The tables on my Oracle server are built from MapInfo TAB files (using MapInfo EasyLoader Utility), and a script is run to fix the SRID and USER_SDO_GEOM_METADATA, so that BM can work with the tables.
For some reason BM isn't recognising my geometry types correctly. In the "Interoperability" dialog, it says every table has a Polygon Geometry Type.
I have checked the Geometry column, and the SDO_GTYPE seems to be correct. What else do I need to check?
Thanks Ian
From my experience, this is a issue with the gtype in the tables. It looks like all are defined as polygon. Also note that there can only be one gtype in a table, else the Oracle Spatial interface will not correctly register it.
Hi Jerry,
I have checked the GTYPE in the tables, and the are correct. The example below is the SEWERMAIN table.
SQL> SELECT a.geoloc.get_gtype() from asset.sewermain a group by a.geoloc.get_gtype();
A.GEOLOC.GET_GTYPE()
--------------------
2
SQL>
As you can see, this table has a GTYPE of 2 (which is a LINE or CURVE - See download.oracle.com/.../sdo_objrelschema.htm for details) and there is only one GTYPE for this table, but as you can see from my original post BM says this is a Polygon.
Any other ideas?
The Bentley Map help file suggest using this query instead, slightly different than yours.
select p.geometry.sdo_gtype, count(*) from <your_table> p group by p.geometry.sdo_gtype;
Jerry
Does your spatial index on that geometry column specify a geometry type or is it "collection" ? Not sure, but we may infer the geometry type from the index type.
I have run your query
"select p.geoloc.sdo_gtype, count(*) from asset.sewermain p group by p.geoloc.sdo_gtype;"
And the result I get is:
GEOLOC.SDO_GTYPE COUNT(*)
---------------------- ----------------------
2002 6473
1 rows selected
Cheers Ian
Fantastic ! Now look at the Spatial Index as Martin has suggested. For the different feature types we typically set them as follows:
Point
CREATE INDEX VAULT_GEOM_SIDX ON VAULT_GEOM(OGC_GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('layer_gtype=point');
Linear
CREATE INDEX CONDUIT_ROUTE_GEOM_SIDX ON CONDUIT_ROUTE_GEOM(OGC_GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('layer_gtype=curve');
Polygon
CREATE INDEX L_SUBMAP_SIDX ON L_SUBMAP(OGC_GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('layer_gtype=polygon');