Hot answers tagged

5

For QGIS versions older than 3.22, you can create a conditional statement for what you want to do with this expression: ("DEM@1" < 0) * (-1) * "DEM@1" + ABS ( ("DEM@1" < 0) - 1) * "DEM@1" Output: 100 -> 100 2 -> 2 -5 -> 5 -150 -> 150 etc.


4

Drape to transfer the raster values to your line vertices as z-values. (I used Densify by interval first to add more vertices.) Field Calculate mean z value of your vertices with: array_mean(array_foreach( (generate_series( 1, num_points( $geometry))), z(point_n($geometry, @element))))


3

If you use the newest QGIS version 3.22, the raster calculator has a new if-condition. Use this expression: if ( "DEM@1" <0, "DEM@1" * -1, "DEM@1")


2

The easiest way to turn negative to corresponding positive values in raster calculator without even using a conditional statement is simply the function abs(): ABS ( "DEM@1" ) See result for the area of the Jordan valley and the Dead Sea (red ouline) that is changed to positive values, whereas the rest remains: left - original DEM, right - output ...


2

In previous versions it simply performs an assignment, a conditional within a parenthesis followed by a *, performs an assignment to all pixels that meet that condition. Try this: ("DEM" < 0 ) *0 + ("DEM" >= 0 ) *"DEM" It will convert all values less than 0 to 0, and leave all other pixels the same. On the other hand, if ...


1

This worked for me: Create a project folder somewhere. Mine is C:\GossanHill. Put your .las files in there. Get the LASTools The programs we need don’t really need to be installed, just saved at a convenient location. Get LASTools from rapidlasso. Open the Lastools.zip file. Navigate to the bin folder. Copy these files to your project folder: las2las....


1

The accepted answer seems to be describing WHAT they are rather than HOW to choose them. (The only heuristics I'm seeing in the accepted answer: know how to use it, and don't when there are outliers) It looks like you choose the interpolation method based on when: A) You need to be certain of how accurate your resulting values are (like with hypothesis ...


1

If you simply want to create a barrier across the stream and don't care about side slopes of the dam: Make a new shapefile and create a narrow polygon across the stream where you want the wall/dam. Convert the polygon to raster (Polygon to Raster) You may need to copy this new raster (Copy Raster) and set the "NoData Value" to zero to remove ...


Only top voted, non community-wiki answers of a minimum length are eligible