Database-Attributed Geom Data Model in MS3D v.3.30!00!200402

3
need to be converted from import reserves import reslib to from grail.ip import reserves from grail.ip import reslib In addition, a gmain function is required at the end of the script def gmain(message, data): if message is messages.gRUN: run() else: cmpsys.gmain(message, data) return None To assist in the conversion of existing MineSight ® IP scripts, use the conversion utility grailcvt.py, avail- able in \winexe directory. The standard MineSight ® IP application scripts (ip-accum.py, ip-reserves.py, etc.) are also found in this location. Utilizing the Enhancement—Microsoft ® SQL Server 2000 Database To utilize a Microsoft ® SQL 2000 database, clients not only need to be running Microsoft ® SQL Server 2000, but also need to run the setup scripts provided on the annual update CD. These scripts need to be executed in SQL Query Analyzer to complete the database configuration. Which is the Correct Relational Database Management System (RDBMS) to Use? The various RDBMS used by the AGDM include: Microsoft ® Access, MSDE (Microsoft ® Data Engine), Microsoft ® SQL Server 2000, and soon to come, an (continued on page 7) February 2004 MineSight ® Foreground in the 6 Many clients find themselves with vast amounts of information and a need to keep this data organized and manageable. Databases not only fill this need, but they can also be accessed to create a MineSight ® 3-D visual display of the stored objects and associ- ated attributes. All MINTEC, inc. clients are given the necessary components to make use of this tool: an established AGDM (Attributed Geometry Data Model), a template database for Microsoft ® Access, SQL scripts for initializing a Microsoft ® SQL database, and MineSight ® 3-D. AGDM Modification in MineSight ® 3-D v3.30-00 The AGDM is an in-house, pre-defined data model which serves as data storage for MineSight ® 3-D and MineSight ® Interactive Planner. AGDM v1.6 was introduced with MineSight ® 3-D v3.30-00. This AGDM version is now compatible with Micro- soft ® Access 2000 and Microsoft ® SQL Server 2000 databases. An Oracle version is on the list of future enhancements for the AGDM. Modifications to the data model were made to include equipment report- ing in MineSight ® Interactive Planner (IP) as well as compatibility with Microsoft ® SQL Server 2000 data- base. A converter, MSAGDMConverter.exe, must be executed to transfer pre-existing databases from v1.3, distributed with MineSight ® v3.2, to v1.6. This utility routine is included on the annual update CD. The database converter can also be used to move individual plans between two databases of the same version. For example, the converter can be used to transfer a plan from a SQL Server database on a cen- tral server to a Microsoft ® Access database on a laptop. Modifications to MineSight ® Interactive Planner Scripts In addition to the database conversion of a MineSight ® IP project, MineSight ® IP scripts need to be converted to make them compatible with MineSight ® Grail. In particular, all import of functions from reslib Attributed Geometry Data Model in MineSight ® 3-D v3.30-00

Transcript of Database-Attributed Geom Data Model in MS3D v.3.30!00!200402

need to be converted from import reserves import reslib to from grail.ip import reserves from grail.ip import reslib In addition, a gmain function is required at the

end of the script def gmain(message, data): if message is messages.gRUN: run() else: cmpsys.gmain(message, data) return None To assist in the conversion of existing MineSight®

IP scripts, use the conversion utility grailcvt.py, avail-able in \winexe directory. The standard MineSight®

IP application scripts (ip-accum.py, ip-reserves.py, etc.) are also found in this location.

Utilizing the Enhancement—Microsoft® SQL Server 2000 Database

To utilize a Microsoft® SQL 2000 database, clients not only need to be running Microsoft® SQL Server 2000, but also need to run the setup scripts provided on the annual update CD. These scripts need to be executed in SQL Query Analyzer to complete the database configuration.

Which is the Correct Relational Database Management System (RDBMS) to Use?

The various RDBMS used by the AGDM include: Microsoft® Access, MSDE (Microsoft® Data Engine), Microsoft® SQL Server 2000, and soon to come, an

(continued on page 7)

February 2004

MineSight® Foregroundin the

6

Many clients find themselves with vast amounts of information and a need to keep this data organized and manageable. Databases not only fill this need, but they can also be accessed to create a MineSight® 3-D visual display of the stored objects and associ-ated attributes. All MINTEC, inc. clients are given the necessary components to make use of this tool: an established AGDM (Attributed Geometry Data Model), a template database for Microsoft® Access, SQL scripts for initializing a Microsoft® SQL database, and MineSight® 3-D.

AGDM Modification in MineSight® 3-D v3.30-00

The AGDM is an in-house, pre-defined data model which serves as data storage for MineSight® 3-D and MineSight® Interactive Planner. AGDM v1.6 was introduced with MineSight® 3-D v3.30-00. This AGDM version is now compatible with Micro-soft® Access 2000 and Microsoft® SQL Server 2000 databases. An Oracle version is on the list of future enhancements for the AGDM. Modifications to the data model were made to include equipment report-ing in MineSight® Interactive Planner (IP) as well as compatibility with Microsoft® SQL Server 2000 data-base. A converter, MSAGDMConverter.exe, must be executed to transfer pre-existing databases from v1.3, distributed with MineSight® v3.2, to v1.6. This utility routine is included on the annual update CD.

The database converter can also be used to move individual plans between two databases of the same version. For example, the converter can be used to transfer a plan from a SQL Server database on a cen-tral server to a Microsoft® Access database on a laptop.

Modifications to MineSight® Interactive Planner Scripts

In addition to the database conversion of a MineSight® IP project, MineSight® IP scripts need to be converted to make them compatible with MineSight® Grail. In particular, all import of functions from reslib

Attributed Geometry Data Model in MineSight® 3-D v3.30-00

(Attributed Geometry Data Model in MineSight® 3-D v3.30-00 continued from page 6)Oracle version. The main characteristics that distinguish one RDBMS from another are storage capabilities, concurrent users, cost, and speed.

Now that you have an idea of the benefits of databases, let’s establish a connection to the AGDM. In this case we will use a Microsoft® Access database, supplied with MineSight®, to illustrate data attribution. First copy the file attrib13_16.mdb (location: \winexe directory) to the local working directory and rename the copy appropriately. In the main MineSight® 3-D viewer, select Database, then select Connect to Attrib-uted Database. The Select Data Source dialog will appear as shown to the right.

Select New to specify the new Machine Data Source. Next, select the data source, in this case Microsoft® Access Driver, and specify an appropriate name. In the Database section of this window, select the database that was established in the direc-tory. Continue to the initial Select Data Source window where the initialized Machine Data Source will be found. Keep the data source highlighted and select OK to connect to the data source. The database is now ready to receive attributed geometry data. Geometry data can be exported into a database directly from MineSight® 3-D. Do not try to export large geometry surfaces or solids as this attributed geometry database is designed for efficiently storing points, polylines, polygons, and small shells.

To move data from a MineSight® Geometry object to the AGDM, begin with an object open in the viewer and an established connection to the desired database. Next, in MineSight® 3-D, go to Database | Export. The program will prompt you to select the object. As each object is selected, a dialog will appear in which the object attributes can be defined. In this dialog add a name for the object and, by selecting the Add/Edit Attri-bute button, define additional attribute types (priority, rock type, etc.).

Once the objects have been added to the database, they can be accessed and modi-fied using MineSight® 3-D or another ODBC compliant database. Once connected to the database, a Geometry View of the database information can be created in MineSight® 3-D. A Geometry View can be established by right click-ing on a desired folder in the Data Manager, select New | Geometry View. Enter your constraint criteria in the Create View Window. After the Geom-etry View is established, styling and labeling can be modified through the Geometry View properties dialogue box.

February 2004

MineSight® Foregroundin the

7

RDBMS Storage Concurrent Users Cost SpeedEngine Capability (simultaneous database users)Microsoft Access 2GB 255 - éMSDE 2GB 5 $ éé

SQL 1TB 100 $$ ééé

Oracle 1TB+ 100+ $$$ éééé

February 2004

MineSight® Foregroundin the

8

In MineSight® 3-D v3.30-00, a new option was added to legend objects that allows you to use geometry objects. In addition to using either a Company Logo, a Cutoff Table, a Drillhole View, or a Model View, you can use an existing geometry object in a legend for plotting. This new option is particularly useful for showing how various geometry objects are displayed, such as node symbols, lines types, or polygon fill colors and pat-terns. For example, a Geologic Explanation that describes rock types and other geologic map symbols (such as faults), is something that could be set up once in a project, then used again in many different plots.

To use a geometry object in a legend object, the geometry object must be in plan. All elements to be dis-played must be in one geometry object and only one geometry object can be selected for use in a Legend object. Individual elements in the geometry object can (and probably should) be attributed differently to enhance their appearance (e.g. use different fill patterns, colors, fonts, and font size, etc). In the example shown in Fig. 1, there are several different elements contained within one geometry object called geol explanation and the individual elements are each attributed differently to show a different fill pattern, color, font style, and size.

Fig. 1. Shows the geometry object, geol explanation, which consists of several different elements, as displayed in the viewer, and in a Preview window from the Legend Object dialog. The elements are shown at an angle in the viewer to illustrate that all of the elements in this geometry object lie on the same horizontal plane. In this example, non-transformed labels were used (note they always face forward), but semi-transformed or transformed labels could have just as easily been used.

(continued on page 9)

Using Geometry Objects in Legend Objects