Generating Road LineStrings with Z (Elevation) through processing involving a Tasmanian statewide Digital Elevation Model (DEM)

This article shows how to create a 3D road centreline dataset from 2D LineStrings for the whole of Tasmania. The elevation data is sourced from a rectangular grid of XYZ points which are converted into three vertex PolygonZ triangles (a form of a TIN). The 2D road centreline LineStrings are converted to 3D by processing each vertex against the triangle it falls in, interpolating the Z value from that triangle, and recompiling a final LineStringZ object from the individual PointZ vertices. The final result is visualized by use of pgAdmin’s Graph Visualizer.

Read More »