#PyQGIS

6 posts

A QGIS 3D map view of Skiddaw and Blencathra seen from the south, with green valley floors, brown fell sides and pale summits, built from the Copernicus 30 m DEM.

Tutorial QGIS

QGIS 3D map view: turn a DEM into 3D terrain

Turn a digital elevation model into 3D terrain in QGIS without plugins: reproject the DEM, drape a hillshaded colour ramp over it, set it as the project terrain, open a 3D map view, exaggerate the relief and export images, OBJ models and animations. Worked example: Keswick, Skiddaw and Helvellyn from the free Copernicus DEM.

Beginner 10 min read

QGIS 3.40 with the Browser panel listing XYZ Tiles connections from basemap.at to IGN Plan IGN v2, and the map showing Esri World Imagery of Keswick and Derwentwater in the Lake District with Esri road and place-name overlays on top.

Tutorial QGIS

XYZ tile URLs for QGIS: 27 free basemaps, checked and ready to load

A checked list of XYZ tile URLs for QGIS: OpenStreetMap styles, Esri imagery and overlays, Sentinel-2 cloudless, and national basemaps for the US, the Netherlands, France, Austria, Switzerland and Germany. Each has its max zoom, attribution and terms, plus a connections file that adds all 27 at once and an open satellite hybrid.

Beginner 13 min read

Geological cross-section 3.2 km long from the vale at A, up the Cotswold escarpment at Crickley Hill, to the plateau at I. A dark LIDAR ground line climbs from 121 to 281 m OD over a buff band showing the ground across the corridor. Forty-five strip logs hang below it, coloured by formation: blue-grey Lias mudstone in the vale, orange Inferior Oolite limestone on the escarpment and green Fuller's Earth on the plateau. Coloured lines join the contacts between holes, and red diamonds mark three holes where the base of the limestone is 11 to 15 m low. A map inset at top left shows the bent section line and its corridor on a LIDAR hillshade.

Tutorial Python Part 4 of 13

A geological cross-section from AGS4 boreholes and LIDAR in Python and QGIS

Draw a 3.2 km geological cross-section up the Cotswold escarpment from real AGS4 borehole logs, with the ground profile from Environment Agency LIDAR. Project every hole in a corridor onto the line, pick and correlate the contacts, and measure how much of each correlation line rests on a log and how much is inferred. Then draw the same section with the QGIS elevation profile.

Intermediate 15 min read

3D view looking north-east up Crickley Hill: LIDAR terrain shaded from green in the vale to buff on the plateau, with 10 m contours, and 112 borehole logs drawn as vertical cylinders coloured by formation. Blue-grey Lias mudstones fill the holes in the vale, orange Inferior Oolite limestones those on the escarpment, and green Fuller's Earth those on the plateau.

Tutorial Python Part 3 of 13

3D borehole logs from AGS4 data in PyVista and QGIS

Build every borehole log in a real AGS4 file as coloured 3D cylinders at their true elevation under Environment Agency LIDAR terrain with PyVista, then style the same intervals in the QGIS 3D map view. Along the way, test whether neighbouring logs agree, and find a block of ground at the top of Crickley Hill where they don't.

Intermediate 12 min read

Map of the A417 Missing Link ground investigation on a grey LIDAR hillshade: 112 coloured points for rotary cored boreholes, trial pits, cone penetration tests, open holes and cable percussion boreholes, strung along the road corridor from the vale in the north-west, up the escarpment and south-east across the plateau, with the deepest holes labelled.

Tutorial Python Part 2 of 13

Boreholes on a map: AGS4 locations in British National Grid with QGIS

Turn the LOCA group of a real AGS4 file into points in British National Grid, see what happens when the CRS is wrong, summarise each hole's geology from GEOL, check every ground level against Environment Agency LIDAR, and build a QGIS project with labels and a map tip that shows the borehole log.

Intermediate 8 min read