Loading the data
This wizard opens automatically when the GIS File Import process starts.
Choose the appropriate collection type and click Next.
Currently, the MapInfo® Interchange Format (MIF) is the only format supported by the GIS file importer. (See the appropriate MapInfo documentation for a complete description of the MIF specification.)
Click Next to continue.
In this step, OCRIS will attempt to identify the coordinate reference system specified in the header section of the MIF file. This is also the code that will be used as the nominated coordinate reference system for the imported collections.
In most cases, OCRIS will be able to identify the correct system, based on the MapInfo® code mappings stored in the GIS reference data tables.
If the list contains more than one reference system, select the one that is most appropriate.
If the mapping was unsuccessful (resulting in an empty list), use the GIS reference data editor to add the missing MapInfo® datum mapping. See xxx for more details in this regard.
Click Next to continue.
Selecting or creating a domain column mapping
The appropriate domain column mapping is selected on the next page.
Basic collection header data and survey data are stored in a fixed structure in the OCRIS database tables; however, additional attributes can also be stored in OCRIS data domains.
Each collection type is associated with two data domains.
The primary domain is used to manage header data specific to the collection as a whole, e.g. unique identifiers, original ownership, establishment details, general descriptions, etc.
The survey domain is used to manage data of a temporal nature, i.e. data relating to the collection as recorded at a specific point in time. This is also known as a survey instance, because each instance comprises a complete new set of polygon surveys associated with the collection.
For example, the shape and status of lease boundaries may change over time, although the original name and other identifying attributes of the lease may remain unchanged. The latter would be stored in the primary lease domain, while the survey instance data would be accessed via the lease survey domain.
Domains are usually created when a new collection type is defined, as explained in xxx.
Domains play an important role when collection outlines are imported into the database. During the import, data loaded from the text file must be stored in the corresponding data domains in the database. OCRIS uses a system of column mappings to regulate this process. The mappings allow data in the source columns to be extracted from the file and stored in the appropriate destination database columns.
At this stage of the import it is possible to:
- create a new mapping, or
- choose an existing mapping.
If the latter option applies, simply select a mapping from the list and click Next to continue to the next step.
If the list is empty, then a new mapping is obviously required.
A new mapping may also be required if the import file contains an entirely different set of header data columns, or if it differs from existing mappings in a significant way (e.g. a different convention for the order in which polygon points are defined).
If any of the above applies, click the Add Mapping toolbutton to add a new mapping, or click Copy as… to create a new mapping based on an existing template.
A list of source columns (i.e. those present in the data file) is displayed on the left.
On the right, two tabs are used to represent the data domains associated with the current collection type, namely the primary and survey domains.
To perform a column mapping, select the source column in the list on the left and select the corresponding destination column in one of the two lists on the right. Click the Map button to link the two columns. To "unmap" a column, select the destination column on the right and click the Undo button.
Switch between the two tabs to define the column mappings for both the primary and the survey domains.
Default values can be used in cases where a column that is required by the domain is either not present in the import file, or is present but does not always contain a value. By supplying a default value, you can ensure that the destination column will always be assigned a value during import.
To assign a default value to a column, select the destination column on the right, type the default value in the edit box and click Apply.
To erase a default value, select the destination column on the right, choose the blank line from the dropdown list associated with the default value edit box, and click Apply.
It is also possible to apply a derived default value by picking one of the predefined pseudo-values from the dropdown list.
- Select $DATE to store the current date in the destination column.
- Select $DATETIME to store the current date and time in the destination column.
- Select $USER to store the user name of the person running the process.
In addition to the column mappings, the form also has an Options tab.
Use the options page to specify the default date format, i.e. the date format that is most likely to be used in the input file.
The option to automatically reverse the order of polygon boundary points should be used for files where the standard convention is not being followed.
The calculated area of a polygon depends on the order in which the boundary points were defined. If the reference system on which the coordinates of the boundary points are based follows the standard cartesian convention (with the X axis increasing from left to right and the Y axis increasing from bottom to top), then vertices traced in an anti-clockwise order will produce a positive result for the area, while a clockwise order will produce a negative result. If the coordinate system is non-standard (+Y points downs) then the opposite is true.
Quite often, polygons stored in MapInfo® MIF files have their boundary points defined in the "wrong" order; therefore OCRIS allows the order of points on a polygon boundary to be reversed automatically on import.
Once the mapping setup is complete, click Save to return to the file import wizard.
Select the desired mapping and click Next.
Details of the selected column mapping will be displayed on the next page of the wizard.
If necessary, use this page to make temporary changes to the current mapping. Temporary changes are effective for the current import only and usually involve columns that have been named differently in the import file, causing the mapping to fail. This usually results in the following warning message:
This could mean that the source column "stage" is either not present in the MIF file, or has been named differently in the file header. Usually this problem can be fixed by either modifying the mapping or by applying a default value.
Click Next once the mapping has been finalised.
Data validation
The preliminary validation results appear on the next page of the wizard.
The data display is divided into two pages or "tabs".
The data frame on the Collections page displays data relating to the main collections domain, while the Surveys tab displays data earmarked for the collection surveys domain. (These data are all imported from the MID file.)
The icons on the data frame tabs indicate the source and severity of any diagnostic messages that may have been generated by the initial data validation.
| Information | Draws attention to something that may not be an issue as such, but should nevertheless be noted | |
| Warning | An issue that does not prevent the process from proceeding to the next stage, but is best fixed before the final import. | |
| Error | Critical error. Must be fixed before the process can continue. |
The actual diagnostic messages are displayed in the information box at the bottom of the window.
Click on an item in the data frame to see the associated diagnostic message.
Date format error
A date format error is the most common type of error to occur at this stage. This issue can be rectified by clicking the Date Format toolbutton to temporarily change the default date format to match the format used in the data file.
To make the change permanent, return to the original column mapping definition and modify the default date format setting in the mapping options.
Polygon is not closed
This error can be fixed in the viewer during the preview stage.
Polygon is "malformed"
OCRIS makes use of SQL Server® spatial data types to perform various operations on polygons in the OCRIS database. This imposes a rather strict set of rules on the way that polygons should be constructed. Vertices cannot cross, overlap or meet at any point along the boundary of the polygon.
It may be possible to find the source of the problem by inspecting the boundary points in the graphic viewer in the preview stage; however, this type of error cannot be corrected within the OCRIS application. It is recommended that the offending polygon or polygons be identified and fixed in the GIS application, after which a new MIF file export should be made.
Collection already exists
This may or may not be an issue.
If the collection already exists in the database, then the new data will be treated as an update. The polygon boundaries will be imported as a new survey instance and will become the new best-ranked survey instance for the existing collection.
If this is the expected behaviour, then no action is necessary.
However, if this is unexpected (i.e. the new data represents an entirely new collection), then the name of the collection may have been duplicated. In that case, a new unique name will have to be allocated to the collection in the input file.
Modifying Collection or Survey Header Data
Data can be modified by selecting a row in either data frame and clicking the Edit toolbutton.
The data fields appearing in the editor will depend on the configuration of the OCRIS data domain that is linked to the current collection type.
Individual field values are either entered directly into the fields editor, or selected from the dropdown list in cases where the field is linked to a code lookup table. Dates can be entered by clicking on the ellipses button and using the calendar widget.
A collection can also be removed from the list by clicking Remove on the collections toolbar.
This will remove the item from the import list, but not from the text file. However, keep in mind that this will result in a partial import of the file.
Once all critical errors have been corrected, click Display to continue to the preview stage.
| The Display button will be enabled when all critical errors have been fixed. Warning messages will not prevent you from proceeding to the preview stage, because very often the cause of a warning message will only become apparent in the graphic viewer. |
Preview Stage
Basic layout
All collections loaded from the MIF file are listed in the data grid on the left side of the window, while the collection outlines are displayed in plan view in the graphic display pane on the right side of the window.
This example shows a single prospect (MKwane) that comprises three polygons, one of which is excluded from the prospect area. (Note the message to that effect in the notification area in the bottom left corner of the window.)
The selected prospect is highlighted in the Collections list at the top left of the window.
The Collection Details pane at the centre left of the window has two tabs.
The Surveys tab shows the survey instance that has been added for this prospect.
The selected polygon (Polygon 1) is highlighted in the Polygons list at the bottom left of the window. The selected polygon is shaded green in the plan view. To select a different polygon, move to the desired row in the polygons list. Alternatively, click inside the polygon of interest in the plan view.
Viewer Options
The graphic display toolbar is used to control the appearance of the plan view.
| After resizing the main application window, click the Redraw toolbutton to refresh the display and make optimal use of the plan view window. | |
| Click this toolbutton to toggle the state of the Auto-zoom option. With auto zoom enabled, the plan view will be adjusted automatically to display only the polygon(s) belonging to the selected collection. | |
| Click the Zoom button to enable the zoom tool, which is used to enlarge a specified portion of the graphic display. Click and drag the left mouse button to define the desired zoom rectangle. | |
| Click these toolbuttons to increase, decrease or reset the scaling factor. | |
| Copy the display image to the Windows® clipboard, from where it can be pasted into a document or drawing. | |
| Save the display image to a file in one of several popular image formats. |
Modifying and deleting collection data
In addition to the graphical view of all collection boundaries imported from the MIF file, the preview stage also allows viewing and editing of the header data associated with collections and related surveys.
Use the Edit toolbutton on the collections menu to view or modify the data associated with individual collections.
The data fields appearing in the editor will depend on the configuration of the OCRIS data domain that is linked to the collections data for the current collection type.
Individual field values are either entered directly in the fields editor or selected from the dropdown list when the field is linked to a code lookup table.
Click Delete Collection to delete the selected collection. This will remove the item from the import list, but not from the text file.
Modifying survey data
Click the Edit toolbutton on the Surveys toolbar to modify data pertaining to the selected survey instance.
The data fields appearing in the editor will depend on the configuration of the OCRIS data domain that is linked to the survey data for the current collection type.
Managing polygons
Most data errors would have been fixed during the initial import stage; therefore, the primary function of the preview stage is to allow closer inspection of the boundaries in order to identify and possibly fix any problems. The most common issues are usually associated with polygon boundary points.
The polygons menu provides basic functions for managing polygons.
Included or excluded?
A polygon that is excluded from the collection area is coloured cyan when selected in the viewer.
As mentioned previously, the distinction between included and excluded polygons relies on the sign of the area of the polygon, which in turn depends on the order in which the boundary points were entered.
OCRIS allows the order of points on a polygon boundary to be reversed automatically on import. Nevertheless, some polygons may still end up being flagged incorrectly. Consequently, these polygons will be displayed as included when they should in fact be excluded (or vice versa).
In cases where the exclude flag for the polygon has been set incorrectly, the flag can be changed by way of the Reverse function on the polygons toolbar.
This will reverse the order of the boundary points for the selected polygon, thereby changing the sign of the calculated area and toggling the value of the exclude flag accordingly.
Open polygons
For a boundary to be properly closed, the first and last boundary points have to be identical. Operations such as area calculations cannot work unless the boundary is properly closed.
The image below shows an example of a closed polygon. Note how point numbers 1 and 6 are in fact identical.
The validation process will flag any polygon that is not properly closed with the warning message:
"Polygon not closed".
To fix this issue, select the polygon in the polygons list and click the Close toolbutton on the polygons menu.
This function adds a duplicate of the first point as the end point of the boundary, ensuring that the polygon is properly closed at the last vertice.
Inspecting the boundary points
The Show Points option makes it possible to inspect the order in which points were entered for a selected polygon.
When this option is enabled, a red dot will appear on the first boundary point of the selected polygon.
The boundary point selection can be changed by clicking the forward or reverse navigation buttons associated with the menu option.
When the selection is changed in this way, the easting and northing of the selected point appears in the footer bar below the plan view.
This tool can also be used to investigate problems with "malformed" polygons. In the example shown below, the selected polygon (shaded green) includes a boundary point that is obviously out of place.
This type of error cannot be fixed in the viewer. Offending polygons should be identified and fixed in the GIS application, after which a new MIF file export should be made.
Import Stage
Before proceeding to the import stage, ensure that all issues have been investigated and dealt with in a satisfactory way.
The import cannot proceed until all critical errors have been fixed.
It is possible to delete offending collections from the import list to allow the process to continue. However, keep in mind that this will result in a partial import of the file.
Once all issues have been dealt with, click Import to load the collections into the database.
Comments
0 comments
Please sign in to leave a comment.