Wednesday 6 April 2016

raster - Performing dikes extraction from DEM?


I do have DEM of 1x1 meter and original LiDAR point cloud in .las, that DEM is made of. I need to extract river dikes (highest points of the dikes) to vector feature (point, polyline).


Any idea for the algorithm or an existing tool?


Dikes are in light gray on the 1st image and below is point cloud image for the example area with the dikes. River centerline in blue.


Dikes are in light gray


Point cloud with the dikes


Any tool for linear features extraction from DEM?


I believe I need something like ENVI’s Spatial Feature Extraction Module (page 7), but without ENVI's part, as I can not afford it :)



Answer




It all depends on where you draw the line. Regardless, this problem looks like it can be readily addressed using the morphological functions available in Spatial Analyst, especially thresholding (performed with "<" and ">" local operations) and "RegionGroup" to identify and extract components.


Although I do not have access to the DEM to illustrate, the first image is almost good enough to do the job anyway. For example, here is a sequence of regiongrouped versions of the red band (with values scaled from 0.0=black to 1.0=white), starting at a threshold of 0 and moving from left to right, top to bottom, in increments of 0.02:


Dikes


(These images were shrunk for reproduction here: all analysis was done at the resolution of the original image.)


The dikes emerge around the boundary of the black region by the start of the second row (threshold = 0.08). At the start of the third row (threshold = 0.16) the dikes form their own components (in dark blue) and at that point can be readily extracted as separate grids or polygons (and their boundaries can be extracted as polylines after an edge detection step). Only the widest dikes remain by the last row (threshold = 0.24 and greater). You will need to select an appropriate threshold in order to get precisely what you want.


In the original DEM, elevations play the role of intensity, so these procedures ought to be similarly effective with the DEM itself. If the DEM has a large extent (including features far from the river or dikes), the relevant features can be selected as those adjacent to the component in which the river feature lies.


Thin unwanted regions found by RegionGroup can be eliminated by applying a small erosion (negative buffer) followed by an equivalent dilation (positive buffer). Small unwanted regions can be excluded on a size criterion (total cell count or area). The highest points on each dike (if that's what is really needed) can be found by comparing the DEM to zonal maximum grids (using the dikes as zones).




Incidentally, this sequence of images was produced in Mathematica 8. Here are the commands for those who may wish to pursue this option.


original = Import["http://i.stack.imgur.com/gV7Du.jpg"];

{r, g, b} = ColorSeparate[original];
frames = ParallelTable[Colorize[MorphologicalComponents[Binarize[r, t/100]],
ColorFunction -> "ThermometerColors"], {t, 0, 30, 2}];
Rasterize @ TableForm[Partition[frames, 4]]

Total clock time (after importing the image) was 0.94 seconds, of which half was needed to shrink and export all 16 images: morphological operations tend to be fast (which is good, because LIDAR DEMs can be huge).


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...