Geoscience for QGIS version 1.2 can now create local grid definitions.
Once you have your local grid CRS (Coordinate Reference System) you can assign it to your vector or raster data, overlay local data on data from standard CRS, reproject into standard CRS or even use the map canvas in your local CRS. In fact, you can do anything that you normally do with one of the thousands of CRS already defined in QGIS.
You need 2 or more sets of points with known coordinates in both your local grid and a standard grid then Geoscience can calculate the affine parameters and construct a Well Know Text (WKT) definition for your grid. This can then be added to QGIS using the Custom CRS menu.
To use the function, go to the Local Grid menu in the Geoscience plugin, then enter the name of your local grid and select the base CRS. The base CRS has to be projected, not geographic. That usually means it has eastings and northings rather than latitude and longitude. After that, enter in your coordinates in both the base and local grids.
Once you have filled in the name, base CRS and coordinate pairs, then click Calculate. The new local CRS in WKT format will appear in the box. Click the Copy button to copy it to the clipboard and click Close.
Go to Settings -> Custom Projections, click the green add button, then type in your local CRS name. Check that the Format is set to WKT, then paste your new definition into the box. Click Validate to make sure it’s formatted correctly, then OK.
You must check some of your known points to make sure that your new CRS is working properly before using it in production! It has been tested with local grids at hand, but they are a small sample.
You can now use your custom CRS just like any of the other CRS already defined in QGIS.
How do we calculate the path of a curved drill hole?
Drill holes are not straight! You would be surprised at just how much a drill hole can bend. If we want to correctly know where our down hole samples are are taken from in 3D space, we need to map the curvature of the hole. To do this, we measure the dip and azimuth of the drill hole at a number of depths down the hole, then “desurvey” the hole to track its path through the ground.
We build up the drill hole path with a series of straight line segments. Each segment has a length and a direction. We start at the collar coordinate and calculate the 3D position of the first line segment. The second line segment starts at the end of the first, then we calculate the end of second segment using an updated direction. This is all very simple, but the tricky bit is calculating the rotation of each line segment.
We know the hole direction at one or more points, usually one of these points is the collar. If this is the only directional information we have then Geoscience will assume the hole is straight. The collar direction can be included as a dip and azimuth column in the collar file or as line in the survey file at 0 depth. Below is an example of a csv survey file.
from the ‘testdata’ directory under your Geoscience plugin installation
It’s also possible to put a tool down the hole and measure the dip and azimuth at different depths. This allows us to track the path of the hole more thoroughly. Data sampling rules still apply and you need to have your survey readings close enough to represent the curvature of the hole.
Survey measurements are put in the survey file with columns for HoleID, Depth, Dip and Azimuth. These will be combined with any dip and azimuth readings in the collar file, then sorted by depth. Geoscience needs a survey defined for the top (collar) and bottom of the hole, so if you don’t already have one the plugin will repeat the nearest available. Note that if there are no surveys for a hole then it will be assumed to be vertical.
We can define the dip and azimuth of drill hole segments at known survey points as a rotation from a horizontal line pointing north (ie 0 azimuth and 0 dip). This rotation is represented as a quaternion.
So, we now have a quaternion to describe the rotation (dip and azimuth) for each drill hole segment at a known down hole survey point, including the top and bottom of the hole. We still need to know the rotation for all the segments in between. We could maintain the same rotation until we hit a new known point, but that doesn’t seam very realistic. Holes don’t go straight and then kink. It’s much more likely that the rotation with change smoothly from one known point to the next.
Quaternions have a very useful feature in that they can be linearly interpolated between two values. This is known as a Spherical Linear Interpolation, or SLERP. Geoscience uses this to figure out the rotation (dip and azimuth) of each drill hole segment in between the known points.
It’s important to understand that it is not the position of the segments that are interpolated. There is a linear interpolation of the rotation.
Once we known the length (set by the “Desurvey length” parameter in the Desurvey dialog) and rotation of each line segment then it is a simple matter to calculate the offset of that segment and add it on to the end of the last segment. All you need to supply is the collar location and the depth, dip and azimuth at your known points.
Desurveying in Geoscience is done with full 3D coordinates. The CollarName_Desurvey.gpkg file generated by this process contains a single row for each drill hole and the geometry for that row is a polyline. Each node of the polyline is one of the calculated points discussed above and consists of a 3D coordinate. When the polyline is displayed in plan the Z coordinate is ignored and the polyline is projected to surface. When we come to process our down hole data (assays, lithology etc), Geoscience will do a linear interpolation between desurveyed nodes, based on the sample depth, to calculate the sample 3D coordinates. Likewise, when it comes to cutting sections through the data we can use the full 3D coordinates to figure out what needs to be shown and generate section coordinates – that’s the topic of another post!
Geoscience for QGIS 1.0 is out now! Please install or update from the QGIS plugin repository.
This version includes the ability to create and display drill sections. You can now cut arbitrary sections through your drilling data using the mouse or orthogonal sections using the keyboard.
You can choose which layers are included in the section, including points, desurveyed drill traces, downhole data layers and elevation rasters.
All layers for a single section are placed under a group so that they can all be toggled on and off together. You can add your own layers to this group for interpretation and annotation.
You can create as many sections as you like. Geoscience stores the section metadata in your QGIS project so that you can recreate them easily next time you open the project. You can also recreate sections if you update the underlying data or source symbology.
Symbology is copied from your source layers, so your sections are consistent with each other and plan representations of your data.
The next release of the Geoscience plugin for QGIS is just around the corner. The big news it that you will be able to create, view and interpret cross sections of your drilling data. The workflow has also been improved to desurvey holes, generate 3D coordinates for down hole data and produce drill traces in plan.
The new release is planned for 9 June 2019. Stay Tuned!