Hot answers tagged

10 votes
Accepted

Elevation from TIFF file

Save the Excel file as CSV In GIS, add the CSV file to QGIS using "Layer > Add Layer > Add Delimited Text Layer" Use "Sample raster values" from "Processing Toolbox (...
Kadir Şahbaz's user avatar
10 votes

Extract raster value at each vertex from line, while keeping the line

You can use "Drape (set Z value from raster)" tool to set the z value of every vertex in the densified line to a value sampled from a raster.
Kadir Şahbaz's user avatar
9 votes
Accepted

Sampling points in raster without generating new file in QGIS

You can use the raster_value function in an expression in the Field Calculator to update a field in your point layer with the pixel value from an underlying raster: raster_value( 'DEM', 1, $geometry )...
Ben W's user avatar
  • 19.2k
9 votes
Accepted

Extract raster value at each vertex from line, while keeping the line

Using QGIS expressions, use this expression: raster_value( 'DEM', 1, start_point($geometry)) This is to get the elevation from the raster called DEM, raster band 1 for the line's start point. To get ...
Babel's user avatar
  • 60.2k
6 votes
Accepted

How to calculate area in mountainous regions

For my use, I have this solution: First I convert my DTM with the tool from SAGA called "Real surface area". After that, I have a raster with the real surface for each pixels, on band 1. ...
katagena's user avatar
  • 1,493
5 votes
Accepted

Extract Single (or small number) Contour from DTM data in QGIS

You can use r.contour: Produces a vector map of specified contours from a raster map.
BERA's user avatar
  • 63.6k
5 votes
Accepted

rasterstats zonal_stats - return cell position

You can grab the indices of the mini raster where the pixel value == the statistic value (i.e min or max) using numpy.argwhere, then use the transform/affine to work out the map coordinates. e.g. from ...
user2856's user avatar
  • 59.8k
4 votes
Accepted

Number of pixels Elevation - Aspect - Slope

A raster has to be rectangular, that is why you get no data values when you clip with a irregular polygon. Maybe slope and aspect cant be calculated at the border to no data. Can you calculate them ...
BERA's user avatar
  • 63.6k
4 votes
Accepted

Identifying and replacing specific pixel in DEM using ArcGIS Pro

You can use several ways to locate the offending pixels. If the raster is small enough simply turn it into a point dataset, you can then select the pixels of interest, now represented as a point, by ...
Hornbydd's user avatar
  • 41.7k
3 votes

Finding highest point relative to point data

Step 1: Add raster values to points (set z from raster), so your points know how high they are. Step 2: Run maximum("height field") on your point layer in the field calculator creating a new ...
Erik's user avatar
  • 15k
3 votes

Extract Single (or small number) Contour from DTM data in QGIS

QGIS is using this GDAL utility https://gdal.org/programs/gdal_contour.html and it has an option to create contours not for intervals but for a fixed set of levels -fl Name one or more “fixed levels”...
user30184's user avatar
  • 60.1k
3 votes
Accepted

Polygons from a raster within an elevation range

Using standard Qgis Contour that is a front end to gdal_contour utility. The solution to draw polygons instead lines is to add these parameters in addition to the command line, -amin -amax is the ...
stefcud's user avatar
  • 386
3 votes

How do you interpret a DEM?

A DEM is to my understanding usually created from the interpolation from other data sources, typically point elevations and\or contour lines, the pixel being assigned an elevation value. When I use a ...
Hornbydd's user avatar
  • 41.7k
3 votes
Accepted

Using Esri ASCII Grid as DEM + Reprojecting

Following the links you provided I downloaded the data. Opening the text file its clear that even though it ends with a txt file name extension the contents conforms to an ASCII grid interchange file ...
Hornbydd's user avatar
  • 41.7k
2 votes
Accepted

How to get the ground level altitude from DSM or Point Cloud using Python

Usually DSM or DEM rasters are georeferenced Tiff files. You can use GDAL or rasterio library to load them into Numpy Array. import numpy as np from osgeo import gdal raster = gdal.Open(&...
Abhilshit's user avatar
  • 626
2 votes
Accepted

Calculating area's region in DEM

Use raster calculator to create a binary raster (black&white; 0&1) with this expression: raster_layer_name@1 < 14. Areas below 14 m will appear in white (=1), all areas above in black (=0). ...
Babel's user avatar
  • 60.2k
2 votes
Accepted

Convert points with x,y coords and value from to a raster image

You need to use an interpolation tool to convert your points to a surface. Here is a tutorial on interpolation that may help you get started. Here is a link to the interpolation tools available in ...
GBG's user avatar
  • 8,817
2 votes
Accepted

Finding average depth of filled sink using ArcGIS Pro

If you want the average of all your sinks then you could convert your difference raster to a point dataset. Each pixel would become a row in your point dataset. Delete out zero difference and ...
Hornbydd's user avatar
  • 41.7k
2 votes
Accepted

Feed pixel type of tiles into MosaicToNewRaster()

There's an ArcGIS Idea about this: arcpy.Describe.PixelType returns useless value From the help you can get the pixel types output by getPixelType and required by MosaicToNewRaster: You can use ...
user2856's user avatar
  • 59.8k
2 votes

Determining slope percentage using ArcMap

Slope angle is equal to Atan(slope ratio)*180/Pi For a slope ratio of 15/100, the angle in degrees is 8.53 You don't need to convert all the slopes values from your raster in degrees, just use this 8....
Kasper's user avatar
  • 3,012
1 vote

DEM 3D problem in QGIS

qgis3threejs treats the canvas outside the DEM as having elevation 0. If your DEM is well above sea-level, you get the effect you're seeing. Look at this issue on the qgis2threejs repository for hints ...
Llaves's user avatar
  • 5,871
1 vote
Accepted

Creating DTM from COPC LAZ Files using PDAL

So the batch was the problem. With a little tweaking it has worked. The solution is..... @echo=off for %%f in ("*copc.laz") do ( pdal pipeline "raster_pipeline.json" --readers....
Richard McDonnell's user avatar
1 vote
Accepted

Elevation dataset appears to have come with all of the Eastings wrong

From the metadata - the CRS is NAD_1983_10TM_AEP_Forest (EPSG:3400) When brought into QGIS in this CRS, the data displays correctly:
user2856's user avatar
  • 59.8k
1 vote
Accepted

Correspondence of 0m elevation height of a digital elevation model (Copernicus DEM) to mean sea level

Here is the answer given by the Support team of Copernicus: The definition of the 0 m elevation for ocean areas is not dependent on the acquisition date of the input images. Please note that the ...
Circus pygargus's user avatar
1 vote

Ortho-rectifying standard non-rectified Maxar satellite imagery

You can definitely use your existing imagery to georeference the image to your existing imagery to help align the two data. See here for help on georeferencing in QGIS. There are also numerous ...
GBG's user avatar
  • 8,817
1 vote
Accepted

Fixing errors in old DTM in QGIS

A couple of options: 1 - r.mapcalc r.mapcalc "output_with_nodata = if(input_dem<=0.01, null(), input_dem)" 2 - Save as + "no data" range right-click on the layer name, Export -&...
RafDouglas C. Tommasi's user avatar
1 vote

Elevation data from WMS or WMTS?

If your only goal is to create a terrain profile, maybe the geoservices REST service could be helpful here: https://geoservices.ign.fr/documentation/services/api-et-services-ogc/calcul-altimetrique-...
christoph's user avatar
  • 4,661
1 vote
Accepted

Adjusting flow direction of river based on DEM in QGIS

Solution 1 Use select by expression with this expression where DEM is the name of your raster layer (digital elevation model): raster_value ('DEM', 1, start_point ($geometry)) < raster_value ('DEM'...
Babel's user avatar
  • 60.2k
1 vote
Accepted

Float32 to UInt16 terracing problem

Providing the scale parameters as in my third code example works. I was expecting the gdal_translate to preserve units but change potential precision. It doesn't. The scale can be assigned to ...
jonathanc's user avatar
1 vote

Getting high resolution DEM for a location

Use https://apps.nationalmap.gov/lidar-explorer/#/ The darker the green the higher the accuracy DEM is available by using the tools (ctrl create window) 1m DEM or 10m is available depending on your ...
Mapperz's user avatar
  • 49.3k

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