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
Martin,
No we don't specify the geometry type in the spatial index.
The SQL to build the index is simply
CREATE INDEX "ASSET"."SEWERMAIN_SX" ON "ASSET"."SEWERMAIN" ("GEOLOC")
INDEXTYPE IS "MDSYS"."SPATIAL_INDEX" ;
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');
Jerry
So just drop and recreate them as I have posted above.
OK, it looks like BM is using the index for the geometry type.
I changed my index (on one table to start with) and specified the geometry type in the index:
SQL> create index sewermain_sx on sewermain(geoloc) indextype is mdsys.spatial_index parameters ('layer_gtype=LINE');
Index created.
SQL> commit;
Commit complete.
SQL>
And now BM recognises this as a line.
So, based on this I am guessing that I need to go and change my scripts to specify the geometry types on the indexes of the files being uploaded.
Fantastic !!!!