Connecting QGIS to the NZ Geotechnical Database
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 this in a new project that you are happy to trash afterward as I have found some lingering issues in adding and removing web service connections within a project. Once your connection has succeeded it is permanent and will appear in your other projects.
Layer>Add Layer>Add ArcGIS FeatureServer layer
Use the New option in the dialogue box above to bring up the Connection properties below
Fill in the dialogue box with a sensible name and paste the URL into the box as shown above. OK it and you should back to the previous dialogue box (see below as well).
Hit the Connect button (above).
You now have the 3 components layers being served available for your project, by selecting and using the Add button. Note that there are several settings and options that you should assess before doing this step.
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 this in a new project that you are happy to trash afterward as I have found some lingering issues in adding and removing web service connections within a project. Once your connection has succeeded it is permanent and will appear in your other projects.
Layer>Add Layer>Add ArcGIS FeatureServer layer
Use the New option in the dialogue box above to bring up the Connection properties below
Fill in the dialogue box with a sensible name and paste the URL into the box as shown above. OK it and you should back to the previous dialogue box (see below as well).
Hit the Connect button (above).
You now have the 3 components layers being served available for your project, by selecting and using the Add button. Note that there are several settings and options that you should assess before doing this step.
- do you want to add all of the data for NZ or just within your view extent? The latter is recommended if you want to improve refresh times.
- do you wish to filter by the attribute table using SQL? Note that the standard filter option for a layer is not available once it sits in a project unlike other vector layers. I would suggest you dont fiddle with this until you are really experienced and have time to spare.
- you can always export the data to a local file format if you want a static copy (perhaps it is easier for cartographic representations). Right click the layer to find this function.
I hope this is helpful and good luck.
Colin
Comments
Post a Comment