Open PFDB
This function provides an interface to a Physical Features DataBase (PFDB) which is used to store data obtained from field surveys or aerial photogrammetry for a region of interest.
To run this function: Choose Survey > Survey database > Open PFDB, or...
The data described in the PFDB is similar to data stored in String files in that it describes features such as:
- roads
- highwall crests
- highwall toes
- builds, etc.
This interface only permits data to be retrieved from the PFDB and saved into a Layer of the Graphics module. The data is presented as either lines or markers depending on whether the data in the PFDB are Linear (string) features or Point features.
The data may subsequently be edited, although this is inadvisable as the edits cannot be copied back into the PFDB, or saved to a string file for later use by other functions.
A Physical Features DataBase (PFDB) consists of 3 tables and is used to store surveyed point data defining physical features. The surveyed points are grouped into structures which are of a certain type and can represent either spot height data or linear features.
The table and field structure must be similar to the following database structure.
Table pf_type
This table stores the range of feature types indicating what the actual feature represents, for example CP for control points, or RL for road limits. The index field is the type field containing the type code. There must be values for the type, string and class fields.
| Fields | Type | Purpose |
|---|---|---|
| type | character(2) | A 2 character code for different types of data e.g., CS = crest string RE = road edge |
| string | integer | The string number to use when extracting this feature to a string file |
| class | character(6) | LINEAR for string type features POINT for spot height features |
| grnd_flag | character(1) | |
| cntl_flag | character(1) | |
| t_descr | character(32) | Verbose description of the type code |
Table pf_struc
This table stores a list of all of the surveyed structures. There must be data for the type, struct_id, s_expiry and s_active fields.
| Fields | Type | Purpose |
|---|---|---|
| type | character(2) | Same as type in pf_type table |
| struct_id | character(4) | Unique identifier (alphanumeric) for the structure |
| s_descr | character(32) | Verbose description for the structure |
| s_min_north | real(8,3) | Minimum Y value for the structure |
| s_max_north | real(8,3) | Maximum Y value for the structure |
| s_min_east | real(8,3) | Minimum X value for the structure |
| s_max_east | real(8,3) | Maximum X value for the structure |
| s_min_elev | real(8,3) | Minimum Z value for the structure |
| s_max_elev | real(8,3) | Maximum Z value for the structure |
| datetime | s_expiry | Expiry date of structure |
| s_active | datetime | Active date of structure |
Table pf_point
This table stores the actual surveyed point information. There must be data for the struct_id, point_id, northing, easting and elevation for point class features. If the type is of a linear class, then there must be values in the next_point and prev_point fields in order to link up the points into the correct order in the output string. For each linear structure, there must be a start point to the structure defined by not having a value in the prev_point field.
| Fields | Type | Purpose |
|---|---|---|
| type | character(2) | Same as type in pf_type table |
| struct_id | character(4) | Same as struct_id in pf_struc |
| point_id | character(10) | Unique alpha-numeric point identifier |
| job_num | character(7) | Job number when point was surveyed |
| meas_acc | character(1) | Code to indicate measured accuracy of point |
| northing | real(8,3) | Y value of point |
| easting | real(8,3) | X value of point |
| elevation | real(8,3) | Z value of point |
| next_point | character(10) | Point id of next point in feature |
| prev_point | character(10) | Point id of previous point in feature |
| p_expiry | datetime | Expiry date of point |
| p_active | datetime | Active date of point |
PFDB Database Definition File
There must exist a PFDB database definition file similar to a geological database definition file, but with a '.pfd' extension rather than a '.ddb' extension. The following is a complete listing of a valid PFDB database definition file:
DATABASE pfdb TYPE "paradox" DB_SPECIFIC "directory=C:/SSI/DEM" TABLE pf_type FIELD type TYPE character( 2) VALIDATION "SSI_edit_style=upper ~SSI_length=2" FIELD string TYPE integer VALIDATION "SSI_edit_style=i4 ~SSI_bounds=1 32000~SSI_decimals=3~SSI_length=8" FIELD class TYPE character( 6) VALIDATION "SSI_edit_style=upper ~SSI_length=6" FIELD grnd_flag TYPE character( 1) VALIDATION "SSI_edit_style=upper ~SSI_length=1" FIELD cntl_flag TYPE character( 1) VALIDATION "SSI_edit_style=upper ~SSI_length=1" FIELD t_descr TYPE character( 32) VALIDATION "SSI_edit_style=mixed ~SSI_length=32" INDEX idx1 UNIQUE ASC type TABLE pf_struc FIELD type TYPE character( 2) VALIDATION "SSI_edit_style=upper ~SSI_length=2" FIELD struct_id TYPE character( 4) VALIDATION "SSI_edit_style=upper ~SSI_length=4" FIELD s_descr TYPE character( 32) VALIDATION "SSI_edit_style=upper ~SSI_length=32" FIELD s_min_north TYPE real( 8, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999999~SSI_decimals=3~SSI_length=8" FIELD s_max_north TYPE real( 8, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999999~SSI_decimals=3~SSI_length=8" FIELD s_min_east TYPE real( 8, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999999~SSI_decimals=3~SSI_length=8" FIELD s_max_east TYPE real( 8, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999999~SSI_decimals=3~SSI_length=8" FIELD s_min_elev TYPE real( 6, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999~SSI_decimals=3~SSI_length=6" FIELD s_max_elev TYPE real( 6, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999~SSI_decimals=3~SSI_length=6" FIELD s_expiry TYPE datetime VALIDATION "SSI_edit_style=datetime ~SSI_decimals=2~SSI_length=20" NULLS FIELD s_active TYPE datetime VALIDATION "SSI_edit_style=datetime ~SSI_decimals=2~SSI_length=20" NULLS INDEX idx2 UNIQUE ASC type ASC struct_id TABLE pf_point FIELD point_id TYPE character( 10) VALIDATION "SSI_edit_style=upper ~SSI_length=10" FIELD type TYPE character( 2) VALIDATION "SSI_edit_style=upper ~SSI_length=2" FIELD struct_id TYPE character( 4) VALIDATION "SSI_edit_style=upper ~SSI_length=4" FIELD job_num TYPE character( 7) VALIDATION "SSI_edit_style=upper ~SSI_length=7" FIELD meas_acc TYPE character( 1) VALIDATION "SSI_edit_style=upper ~SSI_length=1" FIELD northing TYPE real( 8, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999999~SSI_decimals=3~SSI_length=8" FIELD easting TYPE real( 8, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999999~SSI_decimals=3~SSI_length=8" FIELD elevation TYPE real( 6, 3) VALIDATION "SSI_edit_style=r8 ~SSI_bounds=0 9999~SSI_decimals=3~SSI_length=6" FIELD next_point TYPE character( 10) VALIDATION "SSI_edit_style=upper ~SSI_length=10" FIELD prev_point TYPE character( 10) VALIDATION "SSI_edit_style=upper ~SSI_length=10" FIELD p_expiry TYPE character( 16) VALIDATION "SSI_edit_style=upper ~SSI_length=16" FIELD p_active TYPE character( 16) VALIDATION "SSI_edit_style=upper ~SSI_length=16" INDEX idx3 UNIQUE ASC point_id |
Click here for more information on the structure of this definition.
A sample file called `pfdb.pfd' is located in the SSI_ETC directory and may be copied and modified to suit your requirements.
Choose Opn PFDB from the GRAPHICS FILE menu to display the SELECT PFDB DATABASE form.
PFDB Database Name
Enter the name of the Physical Features Database that you wish to connect to. The database must already exist in the format described earlier.
Complete the SELECT PFDB DATABASE form and choose Apply to display the DEFINE THE TYPE CODES form.
Table
Display only. The name of the PFDB table is displayed here.
Range of Type Strings
Enter the range of string numbers corresponding to the Type codes to be extracted. If you leave this entry blank, then only the Type codes listed in the scrolling region below will be extracted.
Type
Enter the names of the types codes in the PF_TYPE table listed which are to be extracted. Use CTRL+X to delete any Type records that are not to be extracted.
String
Enter the string number that the type will be given when it is extracted from the database. If a type is entered, then you must also enter a string number.
Class
Enter the class type, either POINT or LINEAR which describes whether the points in the type are to be treated as spot height points or as feature strings. If a type is entered, then you must also enter a class for that type.
T_Descr
Enter the description of the type. This is optional as it is only used here for display purposes.
Date from and Date to
Enter the Date from and Date to, to determine which features are to be extracted. The features extracted will be dependent upon the following:
- If the Date from and Date to fields are both blank, then only those features which have not expired by the current date will be extracted.
- If only the Date from is blank, then all features whose active date is <=Date to entered and whose expiry date >= Date to entered will be extracted.
- If only the Date to is blank, then all features whose active date is >=Date from entered and which have not expired by the current date will be extracted.
- If both the Date from and Date to are non-blank, then only those features whose active date is >=Date from and <=Date to entered and whose expiry date >= Date to entered will be extracted.
Minimum Y, Maximum Y, Minimum X, Maximum X
Area constraints - Minimum Y, Maximum Y, Minimum X, and Maximum X may be used to restrict the data which is returned from the PFDB. Any or all of these area limits may be left blank if they are not required. For those coordinate limits which are required enter an appropriate value.
Note that these area constraints are applied in such a manner that:
- LINEAR structures which are only partly contained within these constraints will be extracted with all points even though some points may be outside the area of interest.
Linear structures which are completely outside the area of interest will be completely ignored unless the coordinate limits of these structures cover in some way the area of interest.
- POINT structures will only have the points which are inside the constraints.
Complete the DEFINE THE TYPE CODES form and choose Apply to display the DEFINE QUERY CONSTRAINTS form.
This form allows you to restrict the data to be processed by defining constraints on the PF_STRUC table.
Table Name
Display only showing that the constraints entered will be applied to the named pf_struc table.
Field Name
Enter the name of the field upon which you wish to impose field constraints or select it from the pull down list of field names. If no value is entered, then all of the records in the table will be selected.
Operand
Enter the operation that will define the field constraints. Valid entries for the operand are:
| < | less than |
| <= | less than or equal to |
| > | greater than |
| >= | greater than or equal to |
| <> | not equal to |
| = | equal to |
Constraint Value
Enter the value for the constraint that you wish to apply. A typical example of a constraint may be to obtain only structures with a certain range of ID's.:
| Field Name | Operand | Constraint Value |
|---|---|---|
| struct_id | >= | A100 |
| struct_id | <= | A200 |
Note:Area and Date constraints are applied based on the entries made on the DEFINE THE TYPE CODES form and should not be entered on the DEFINE QUERY CONSTRAINTS form.
Complete the DEFINE QUERY CONSTRAINTS form and choose Apply to begin the extraction of points from the pf_point table into strings.
Messages
During processing, a message will appear in the message window indicating the type code currently being extracted. As each type is extracted and stored into the appropriate string number, it is displayed in Graphics as either a solid line or points depending on its class.
Result
Strings are created of the nominated types and displayed in Graphics. Each point extracted will have the point number in the D1 field, the structure id in the D2 field and the type code in the D3 field. You may now edit the strings displayed and then save to a string file using the Save File function.