Register | Login
Attackpoint - performance and training tools for orienteering athletes

Discussion: Cliffs

in: Spike; Spike > 2020-06-27

Jun 27, 2020 7:34 PM # 
Thanks. I've been trying to find a way to make neat, organized cliffs from KP that don't require as much work as I what I've been doing. I'll give this a shot.
Sep 13, 2020 7:59 AM # 
Did it work?
I'll try this.
Sep 13, 2020 8:11 AM # 
Is "vector>buffer" the buffer command in the vector menu? (for some reason vector menu is empty for me :().
Sep 13, 2020 12:35 PM # 
Vector > geoprocessing tools > buffer

If it isn't there, try Processing > Toolbox and then search for "buffer"

I think it is also important to reproject the cliff vector DXF before you do the buffer. I didn't write that in my notes, but I seem to remember that being necessary for the buffer and v.voronoi.skeleton to work properly.
Sep 13, 2020 5:41 PM # 
This has been working well for me (thanks Mike!) but one minor issue I've found is my resulting cliff vectors imported as dxf have a small artifact or 'hanging chad' on each end of the vector. Small enough you probably wouldn't notice it a printing scale, and easy enough to select the point on each end and delete - but it is time consuming to clean up. I usually go over each section of map closely and clean it up prior to taking it into the field for fieldwork so I just make it part of the cleanup pass. That way its easier to tweak the cliff in the field if necessary. But if I could eliminate the chads during the software generation process, that would be better..
Sep 13, 2020 8:56 PM # 
Here's something that might work to fix the "hanging chad."

The idea is to extract the first and last points (vertices) on the DXF cliff lines. Then create a buffer around those points. The use the buffer layer to cut off the ends of the cliff lines (using the "difference" tool). I tested it and it seems to work:

1. load the layer with the cliff lines.

2. Find the "extract specific vertices" tool by searching in the processing toolbox.

3. In the Extract Specific Vertices tool, pick the cliffs as the input layer and set the vertex indices to 0.

The result is a new point layer with one or two points at the end of each cliff. I don't understand why it sometimes picks two points, but I don't think it will matter.

You now have a layer that is labelled "vertices." That layer is the end points of the cliffs.

4. Create a buffer based on the Vertices. Vector > Geoprocessing Tools > Buffer. Select Vertices as the input layer and then set the distance to 0.5 or 1 meters (you may need to play around with this to see what distance works best given your specific data). Running this tool will create a layer called "Buffered."

5.Vector > Geoprocessing Tools > Difference. Selecect the cliffs as the input layer and Buffered as the overlay layer. Run the tool and the result is layer called "Difference" that is the cliff lines with the first and last bit of the line cut off.

I think this gets rid of those hanging chads. You will need to experiment with the size of the buffer to see what work.

There might be another way to do something similar, but the above steps are what I first thought of (and they seem to work). I'm not 100 percent sure it will address those chads, but it is a lot easier than trying to edit them one by one.
Oct 4, 2020 4:45 AM # 
Some small comments on instructions:
1) v.voronoi.skeleton is v.voronoi command (function?) and then "skeleton" as advanced parameter checkbox.
2) for some reason I cannot choose layer directly for the voronoi work, but had to first save shapefile.
Oct 4, 2020 6:01 AM # 
For small pieces this worked, but if I loaded a larger file (merged one) from KP, instead of skeleton, I get a very random looking lines inside the merged balloons.
I wonder if I am missing some additional flag (the small file worked though), or the qgis implementation is incorrect.
Oct 4, 2020 6:27 AM # 
I was using older qgis; will try with 3.14.
Oct 4, 2020 6:39 AM # 
!@#$, still does not work - although I get bunch of warning messages with my file now. I'll try to cut down the area I am working on - I have seen situations where some stray object far out causes trouble.
Oct 4, 2020 6:59 AM # 
Made it work: got rid of couple of the fake cliffs around the border of LIDAR. After that the algorithm mostly worked (I think I still see some questionable output). woot!
Oct 4, 2020 7:36 AM # 
The result is no good :(. Lots of approximations end up being something that I want to adjust a little bit, even when comparing to the KP map, including instances on the line crossing the creek when there are cliffs on both sides :(.

And I have a map where I have plenty of them.

Did you customize some parameters?
Oct 4, 2020 4:22 PM # 
I don't recall using any custom parameters, but I tested different distance settings for the buffer. It might be worth trying a very short distance setting to try to avoid combing cliffs from different sides of a creek.

I suspect you get better or worse final results depending on the terrain.

I haven't tried it, but I wonder if thinning the lidar before running KP might help. My thinking is that thinner density of points would make simpler cliff lines in KP. I could be completely wrong about that.

I was using QGIS desktop 3.14.1 with Grass 7.8.3.
Oct 4, 2020 5:55 PM # 
I'm running QGIS 3.10.4 on Linux.
i'm buffering the KP cliffs data to 2m. Most everything else is default.

Cliffs are pretty good upon field checking - minor tweaking in field to align on contours (adjusting either the cliff or contour depending upon situation). Not much to add.

Please login to add a message.