Slope as Input to Geology Hybrid Model

Original process of generating slope:

  1. combine DEM tiles (25m res, from https://lris.scinfo.org.nz/)
  2. reduce resolution to 270m (~9 arc second, billinear resampling)
  3. calculate slope as percentage, 8 neighbours (queen case), Horn algorithm, whole units (0.01 per 1 percent)


From left to right:

  1. 25m DEM
  2. 25m slope, max value 4.64 (~78 degree angle)
  3. 270m slope, max value 1.55 (~58 degree angle)

Notes

  • lower res has ~0 slope around 270m of mountain ridgelines
  • lower res has lower values (averaged/scaled peaks)

Before / After

LRIS Server Issues

Downloading in NZGD2000/NZTM (EPSG:2193) returned tiles that were independently horizontally aligned (some on whole numbers, some on different fractions of a metre). Combining these is impossible without the result being shifted.

Left: (as given, a single tile), Right: combined with all other tiles with arbitrary points of horizontal alignment.

Also, this missalignment leads to gaps or overlaps of around 10m.

Conclusion

Using the 8m data from LINZ (which is downsampled to 270m) is easier to work with, it also has a sane "nodata" value in the TIFF (-32767 instead of -3.4028234663852886e+38). The 8m dataset is too large to download in one go though it can be cropped and then combined.

Sprint 66 Results

Runs everything but MVN in 1 minute (instead of days).

Previous R code (left, contains mvn), new Python code (right). Most of the shift is raster interpolation at given zoom level. Previous pixels centred every 100m at coord x00, Python code centres at x50.

Slope at small values (left), geology at small values showing slope influence (centre), previous geology (right). Geology scale 180 (black) → 215 (white). South of lake Ellesmere, the new slope data is different at small values, to be investigated further.

Old slope on left, new on right. Covering a large value range, they look the same. New one has more values around coast which may be a result of starting with a greater resolution.

Zoomed in to very small slope values, the new algorithm (right) is working differently. The old one seems to be just following contours while the new method found sees the bigger picture. However, the slope factors are influenced most in these ranges.

Sprint 67 Results

Slope Differences

Added contours used to generate the DEM (https://data.linz.govt.nz/layer/768). It is clear that the original only highlighted slope around contour edges (20m contours). Using gdal, the slope is at least averaged more over the contour plane.
This is probably an issue with using contour generated DEM.

This is causing large differences as the greyscale region is the region of interest so we can expect differences of pretty much the entire interpolation range.

It may be useful to overwrite contour DEM regions where LiDAR DEM is available. Or use SRTM data.

MVN Differences

MVN was tested to produce the same results given a test input dataset.

The original correlation was precalculated for logarithmically spaced distances. It used an inverse exponential function. The correlation was then interpolated linearly on this x and y dataset.

Now, the inverse exponential calculation is run directly on distances instead of using interpolation of a pre-calculated set. The lower bound of 0.1m distance remains.

Geology ID Differences

Point's polygon ID in Python having acuracy issues. There is a 24m distance between the point and the boundary.

This happens when using the rasterization speedup (default is 100m pixels).

Coast Distance Differences

Coast distance is rasterized at 100m pixels. There is a gradient between 8 and 20km. Rasterization at this resolution is considered insignificant as even the datasource isn't expected to be exact and +-100m over the 8-20k range is also insignificant.

The difference in Vs30 values is usually ~0.4m/s. It can be as high as 260m/s (vs30 gradient diff) / 12000m (distance of gradient diff) * 100m (max pixel distance) = 2.1m/s 

Increasing coast rasterisation can decrease this (or not using rasterization).

Sprint 68 Results

Contour (left) vs SRTM (right, new) based slope.

Results Open in QGIS

Viewing point based (left) and raster based (right) outputs. Project files are available in output directory.



  • No labels