Index:
- Where can I find out more about Oracle's Spatial database capabilities? Is there any documentation or training material available on Oracle Spatial?
- Can I view existing spatial layers from other sources with MicroStation GeoGraphics iSpatial Edition?
- Can I view layers I created in MicroStation GeoGraphics iSpatial Edition from other spatially enabled applications?
- How can I keep my data in one Oracle schema, and have many users access it?
- How do I query the object types and varying arrays used in MicroStation GeoGraphics iSpatial Edition via SQL?
- Should I access my spatial layers via the Map Manager or from the new Spatial query tools?
- What are SDO_GEOM.VALIDATE_GEOMETRY and SDO_GEOM.VALIDATE_LAYER?
- How does MicroStation GeoGraphics iSpatial Edition round trip elements from Oracle Spatial and keep MicroStation specific element attribute information?
- How can I make sure that I have all the current client and server patches from Oracle? How can I get these Oracle client and server patches?
- MicroStation GeoGraphics iSpatial Edition has passed an Oracle error message on to me? How can I determine what the error message really means?
- Are there any sample applications I can use that demonstrate the functionality of Bentley's SDODGN API?
- How can I speed up spatial querying and posting?
- What is spatial indexing and which indexing option should I be using?
- When creating tables and indexes, can I control where and how objects are created in my Oracle database?
- I notice there are numerous LOB objects created in my database whose names all start with SYS_LOB. What are these objects and how can I control their naming and creation?
- In Spatial Configuration, when I attempt to drag a feature into a layer table I receive the message "One invalid element skipped. How do I resolve this so that I can add this feature?
- Is MicroStation GeoGraphics iSpatial Edition only designed to be used with Oracle Spatial projects?
Question 1: Where can I find out more about Oracle's Spatial database capabilities? Is there any documentation or training material available on Oracle Spatial?
Answer: Oracle maintains a Spatial Web site as part of it's Technology Network. This site includes the Oracle Spatial User's Guide and Oracle Spatial Training Class material - as well as the Oracle Spatial Java Class Library (SDOAPI) that is required in order to operate MicroStation GeoGraphics iSpatial Edition.
Question 2: Can I view existing spatial layers from other sources with MicroStation GeoGraphics iSpatial Edition?
Answer: MicroStation GeoGraphics iSpatial Edition will automatically see any existing spatial layers that reside in the current schema regardless of whether these layers are registered as part of a MicroStation GeoGraphics iSpatial Edition project or not. Non registered layers will be available for query purposes only. Additionally, since element attribute information may be in a format unrecognized by MicroStation GeoGraphics iSpatial Edition, these layers will initially query back in pure Oracle Spatial format: point, line and polygons without style. In order to query these layers back with the desired element attributes, they will either need to be feature coded and incorporated into the project or this information can be provided via XML.
Back to Index
Question 3: Can I view layers I created in MicroStation GeoGraphics iSpatial Edition from other spatially enabled applications?
Answer: Yes. The geometry data that is stored by MicroStation GeoGraphics iSpatial Edition is 100 percent Oracle Spatial and OGIS compliant. Please keep in mind however that other software may have different methods of accessing and storing element attribution information. Accordingly, layers that query back in MicroStation GeoGraphics iSpatial Edition with unique line styles, colors, and as various MicroStation element types will likely query back as pure Oracle Spatial: points, lines and polygons without style. MicroStation GeoGraphics iSpatial Edition provides storage of attribute information in XML format in an effort to make sharing of element attribute information as easy as currently possible. Advanced users can utilize this XML data to successfully reconstitute elements with correct style when using software other than MicroStation GeoGraphics iSpatial Edition.
Question 4: How can I keep my data in one Oracle schema, and have many users access it?
Answer: The Sharing menu item from the MicroStation GeoGraphics iSpatial Edition Project Setup dialog will create synonyms and grant privileges required for a user to access a project that resides in another Oracle schema. The database user that owns the schema must share the project. Users attempting to access a shared project must create the variable MS_GEOPROJADMIN and set this to equal to the name of the shared schema.(we suggest you set this variable in your UCF file) Additionally, any objects owned by the user accessing the project that have the same name as an object in the shared project will take precedence over the shared object.
Back to Index
Question 5: How do I query the object types and varying arrays used in MicroStation GeoGraphics iSpatial Edition via SQL?
Answer: Both MicroStation GeoGraphics iSpatial Edition and Oracle Spatial use custom object types and varying arrays. These objects require a different approach when querying or manipulating with SQL than traditional data types. While it's not practical to provide SQL examples for all the possible scenarios you may run into, here are two examples of SQL queries on objects and varrays using a sample table named TAXLINE.
describe TAXLINE
|
Name |
Type |
|
GEOM |
MDSYS.SDO_GEOMETRY |
|
GID |
NUMBER(10) |
To query an object you must use a table alias to resolve any object ambiguity:
select T.GEOM.SDO_GTYPE from TAXLINE T where T.GID = 1;
To query a VARRAY you can either use PL/SQL or the TABLE function. An example of the TABLE function follows:
select B.* from TAXLINE T, table (T.GEOM.SDO_ORDINATES) B where T.GID = 1;
Question 6: Should I access my spatial layers via the Map Manager or from the new Spatial query tools?
Answer: It is possible to use either the Map Manager method of retrieving spatial data for display in MicroStation GeoGraphics iSpatial Edition, or to handle spatial data as layers unto themselves. The Map Manager functionality provides integration with the traditional MicroStation GeoGraphics iSpatial Edition workflow and may be ideal for users looking to incorporate a few spatial layers into an existing DGN-ased project. The Spatial Query options allows for quick retrieval of an entire spatial layer or specific layer data based on spatial or attribute criteria. In general, Spatial Query provides a more powerful interface to Oracle Spatial's capabilities.
Back to Index
Question 7: What are SDO_GEOM.VALIDATE_GEOMETRY and SDO_GEOM.VALIDATE_LAYER?
Answer: Oracle provides two very similar tools for validating spatial geometries: a function SDO_GEOM.VALIDATE_GEOMETRY and a procedure SDO_GEOM.VALIDATE_LAYER.
Running the Oracle function or procedure is one of the first troubleshooting steps to take if you experience undesired results with your data. This function/procedure determines whether all the geometries in a layer follow the defined rules for geometry objects. After running the function/procedure, any Oracle error number along with a unique identifier for the row are reported to the results table.
For complete instructions on SDO_GEOM.VALIDATE_GEOMETRY and SDO_GEOM.VALIDATE_LAYER please refer to the Oracle Spatial Users Guide.
Question 8: How does MicroStation GeoGraphics iSpatial Edition round trip elements from Oracle Spatial and keep MicroStation-specific element attribute information?
Answer: By default, MicroStation GeoGraphics iSpatial Edition relies on feature definitions to faithfully reproduce elements. However, in anticipation of future standards for storing style, we also store this information in XML format for all geometries. In MicroStation GeoGraphics iSpatial Edition, a query option, Use XML Style, is provided if you wish to to override display based on feature code definitions and use XML definitions. Advanced users can utilize the XML data stored by MicroStation GeoGraphics iSpatial Edition to return elements with attributes intact when using software other than MicroStation GeoGraphics iSpatial Edition.
Back to Index
Question 9: How can I make sure that I have all the current client and server patches from Oracle? How can I get these Oracle client and server patches?
Answer: All Oracle software and Oracle patches must be obtained through Oracle. Current software versions can be downloaded from the Oracle TechNet Web site.
Oracle patches are obtained through the MetaLink Web site. You must have an active support service contract with Oracle in order to access this site.
Back to Index
Question 10: MicroStation GeoGraphics iSpatial Edition has passed an Oracle error message on to me? How can I determine what the error message really means?
Answer: MicroStation GeoGraphics iSpatial Edition passes on these messages (which are generated by the Oracle Server) to users so that they can diagnose, and accordingly troubleshoot their database. Spatial errors will usually be in the range of ORA-12700 to ORA-19399. For more information on errors that fall within these values, please check the following link:
http://technet.oracle.com/doc/oracle8i_816/server.816/a76999/e12700.htm#1656
A full list of Oracle errors message and descriptions can be found at:
http://technet.oracle.com/doc/oracle8i_816/server.816/a76999/toc.htm
Back to Index
Question 11: Are there any sample applications I can use that demonstrate the functionality of Bentley's SDODGN API?
Answer: SELECT subscribers can go to Bentley's Developer Support site and download the MSJVIEWER application. This example application provides a graphical interface for posting and querying spatial geometries utilizing Bentley's SDOAPI technology.
Question 12: How can I speed up spatial querying and posting?
Answer: Your first step is always to make sure that your network is optimized for Oracle Server, and that Oracle itself has been properly tuned for performance. A discussion of those topics is far beyond the bounds of this document however. As pertaining to MicroStation GeoGraphics iSpatial Edition performance, a good checklist of items to look into when hoping to speed up query and post time is:
When Querying:
Make sure you are querying indexed data, and that your choice of Spatial index is correct for your data.
Use the Estimate Index tool from MicroStation GeoGraphics iSpatial Edition Spatial Configuration dialog to make sure your index is created with the proper tiling levels. This tool provides an easy graphical method of accessing Oracle's procedure for index tiling suggestions.
Oracle strongly recommends that you regularly Analyze your Spatial schema.
Use the provided MicroStation GeoGraphics iSpatial Edition tools to query only the data you wish to view. For example, query back only a specific feature rather than an entire layer with just one feature turned on for display. Making use of Spatial Query's Where Clause capability is another way to ensure precise queries.
Validate your layers to ensure you are querying valid data. (see question #7)
Querying from a large number of layers will require more processing, and increase query times.
Use of the Oracle 8.1.7 client and server software is recommended over 8.1.6.
When Posting:
When posting data, if Spatial indexes exist they must be updated along with the table they apply to. Substantial performance gains will be seen if you drop your indexes before posting, as the overhead of updating the indexes is eliminated. Be sure to recreate your indexes after posting.
Be sure that you are posting supported element types. MicroStation GeoGraphics iSpatial Edition will pass over any unsupported elements, but will have to process this data just as it will for the successfully posted items.
Oracle strongly recommends that you regularly Analyze your Spatial schema.
Use the provided MicroStation GeoGraphics iSpatial Edition tools to post only the data you wish to view. For example if you've only made a few changes to your data, post these changes by fence or selection set rather than ALL.
Posting to a large number of layers will require more processing, and increase posting times.
Use of the Oracle 8.1.7 client and server software is recommended over 8.1.6.
Back to Index
Question 13: What is spatial indexing and which indexing option should I be using?
Answer: A spatial index provides a mechanism to limit searches and speed up spatial queries, as well as allowing users to query on a specific geographic area . It's function is really quite similar to that of any other index in Oracle, only the data being indexed is of a spatial nature. Oracle allows you to select either R-Tree indexing or quadtree indexing (Fixed or Hybrid). R-Tree indexing is the default for Release 8.1.7 (and 9i), but the decision of which indexing method is most appropriate for a layer is dependent on your data. The Oracle Spatial Users Guide goes into great depth describing indexing concepts and advising on when to use a given index type.
Question 14: When creating tables and indexes, can I control where and how objects are created in my Oracle database?
Answer: MicroStation GeoGraphics iSpatial Edition provides an option in the SDO Configuration dialog named Advanced Mode. When this is checked on you can edit the SQL sent to your database server when creating tables and indexes from MicroStation GeoGraphics iSpatial Edition. A simple example of this would be a user wishing to store all his indexes in a separate tablespace named INDEX. This can be achieved by adding TABLESPACE=INDEX to the end of the 'create index' statement that MicroStation GeoGraphics iSpatial Edition has provided. Please be sure to verify that your SQL syntax is correct when using the Advanced Mode. If the syntax is not correct you will receive an Oracle error, (just as you would if you issued the statement through SQL*Plus) and the object will not be created.
Back to Index
Question 15: I notice there are numerous LOB objects created in my database whose names all start with SYS_LOB. What are these objects and how can I control their naming and creation?
Answer: When using the mdsys.sdo_geometry object, Oracle automatically creates out-of-line LOB segments to store data that exceeds 4 kilobytes. The system will automatically assign a name to the segments if one is not specified, and this name will always begin with SYS_LOB. It is possible however to specify a name, as well as storage properties in the object creation statement. Note: In MicroStation GeoGraphics iSpatial Edition this is possible when using the Advanced Mode from Spatial Configuration.
Below is an example where these objects are named and located in an existing tablespace named LOBS:
create table lob_example
(mslink NUMBER PRIMARY KEY,
name VARCHAR2(32),
geom MDSYS.SDO_GEOMETRY,
textval varchar2(256))
VARRAY shape.sdo_ordinates store as lob LOB_EX_SDO_ORD
VARRAY shape.sdo_elem_info store as lob LOB_EX_SDO_ELEM
tablespace LOBS;
Question 16: In Spatial Configuration, when I attempt to drag a feature into a layer table I receive the message "One invalid element skipped. How do I resolve this so that I can add this feature?
Answer: To resolve this error, go into Feature Setup and highlight the feature you wish to assign to your table/layer. Take note of the field in the Feature Setup dialog entitled "Table." This key-in field is used to associate a user attribute table with a feature. If you are using the single table model (geometry and attribute data in the same table), this entry must contain the name of the table that you want to assign the feature to. Entering the name of the attribute table here will remedy the 'invalid element' message and allow you to add the feature to the geometry and attribute table from Spatial Configuration.
Back to Index
Question 17: Is MicroStation GeoGraphics iSpatial Edition only designed to be used with Oracle Spatial projects?
Answer: No. You may use traditional (non spatial) projects that store elements in design files and attribute information in any of the supported MicroStation GeoGraphics iSpatial Edition databases. Similarly, Oracle Spatial is a non-required installation option for Oracle 8i Server. You do not have to install the Oracle Spatial option to use Oracle 8i with MicroStation GeoGraphics iSpatial Edition if you do not plan on storing graphical data in your Oracle database.