Posts

Geocoding addresses with the MMQGIS plugin within QGIS

Image
I have been given a spreadsheet of geotechnical reports (thousands of records) that I want to plot the location of in GIS, but unfortunately the list does not have coordinates! However, many of the records have street addresses that potentially are able to be geocoded. While geocoding has some pitfuls it should at least create approximate coordinates as a starting point and batch processing could save a lot of time. In looking through various options for batch conversion, I stumbled across the MMGIS  plugin. After a little experimentation I managed to get a reasonable result. While there is a help file available, there are a couple of steps that I am documenting more fully, for my benefit and anyone else that happens to read this blog. My explanation below applies to an address format that works in Australia.  While it does not appear that all the attributes of the table can be loaded into the file required for processing, a unique identifier field can be added (not documented...

Orthorectification of historic aerial photos

Updated Dec 14 2020 One of the occasional tasks I undertake in my geological mapping work is to orthorectify historic vertical aerial photos in order to examine them in a GIS. The old photos have much value as they capture the landscape at particular point in time where it may have been subsequently modified. I have recently been working in the Launceston area and have created mosaics of the oldest and most detailed photos available in order to show extent of older quarries, geomorphic features, geology, etc. As an example, I was recently asked to comment on a development application on a former quarry site and the old photos were very good at showing the extent of ground disturbance. I created a digital stereopair with StereoPhotomaker (see earlier blog) from the scans and made a rectified image for the GIS from which I was able to gain a good understanding of the site.   This blog provides a documented methodology for my own benefit and anyone else. There are two main consid...

Geological Dip and Strike Label Placement in QGIS

If you are interested in automatically placing the dip value in the same position relative to the dip direction for cartographic reasons (when plotting a map) then you have come to the right place. (I must confess I have borrowed and modified this tip from the Irish QGIS site (with thanks and unfortunately cannot find the link despite some effort) but am repeating it here so that I have my tips in one location.) To state the problem in another way, without this script the dip value will stay in the same geographic position with respect to the point symbol regardless of which way the symbol is oriented. This doesnt look good and therefore finding an automated method of displaying such information on large datasets is highly desirable. The solution (assuming you are familiar with labelling point features in QGIS): In the symbol placement tab of the Layer Properties, choose the Offset from Point option and place the following script in the data derived override option for the Offset X,Y...

Going Digital: Air Photo Interpretation for Geotechnical Investigations

Image
Air Photo Interpretation (API) is a critical component of understanding sites yet it is my observation that this is seldom done in many of the residential geotechnical reports I get to see in my role within the Tasmanian Government. The availability of aerial photographs has never been easier as Land Tasmania (and presumably other jurisdictions) has recently completed a major project by scanning their entire collection dating back to the 1940s. These photos can be searched online (from theLIST website) and able to be delivered in digital form to one's desktop. Until recently this used to incur a fee of around $50 per image but recently (2022) these photos are now free. There are probably several reasons why API is not being done (I will avoid the politics) but I am going to provide a low cost and efficient solution for working with digital images in stereovision that may represent one of the greatest obstacle for practitioners. The traditional method of viewing aerial pho...

Connecting QGIS to the NZ Geotechnical Database

Image
I have recently been informed that the New Zealand Geotechnical Database can be connected to via web services. This is a fantastic achievement and I will present a step by step instruction on how to connect to it as it can be a little difficult. I am more than happy if the NZGD custodians use these on their website and please let me know if I have made a mistake or if there is a better way. Web connections can be pretty frustrating at times and assume prior knowledge. I dont pretend to understand all the flavours! Firstly, it is important to work out what kind of the service this is. The URL can be found on the NZGD website with a bit of hunting if you know what to look for. The URL below suggests it is an 'ArcGIS FeatureServer layer' using QGIS terminology. (BTW I am using QGIS 3.10.2) https://services2.arcgis.com/4xCbYRzn07xe64Sn/arcgis/rest/services/NewZealandGeotechnicalDatabase/FeatureServer Knowing what type of service makes the next step easy. However, why not do...

How to assign RGB colours to QGIS vector file

Image
A frequent request of MRT is whether we have a symbology file for the geology polygon layers that can be imported into QGIS to replicate the map images. It so happens that an RGB text file has been made available that has the correct colours. Unfortunately patterns are not available but in a subsequent blog I will outline how to create them in QGIS There are two ways to do this: A) The simple way (but does not create a useful legend) 1.        Join a RGB table of values to the matching geology layer based on a common field. The table can be something like this (space delimited example):   Code R G B 9502 24 38 240 9500 32 62 10 etc 2.        In the Symbology window for the geology layer choose single symbol option (at the top of the screen). Not exactly  intuitive! 3.        Press the data defined override expression button to the right of the Fill Co...

Virtual layers in QGIS and the task of identifying spatially coincident point features

A typical housekeeping task in my workplace is finding historic drillholes that have been entered into a database in an approximate manner, all with the same coordinates (and not their correct position)!. This may have happened for several valid reasons including when the location of the holes in an old investigation was not provided, other than on a basic plan, and those entering the data did not have time to determine accurate coordinates. The other situation is when a drill hole has been entered multiple times into a database by mistake and possibly given a different name that makes it difficult to easily identify by a standard attribute search. So is it possible to find point features (such as drill holes or sample locations) that have been given coincident coordinates in order to fix them? While there may be several ways of doing this, the answer is surprisingly simple through the use of virtual layers in QGIS! Virtual layers allows the power of SQL database functionality...