Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gdaldem]

Tools to analyze and visualize DEMs under the GDAL umbrella. Operational since GDAL 1.7.0. It has 7 different modes hillshade, slope, aspect, color-relief, TRI (Terrain Ruggedness Index), TPI (Topographic Position Index), or roughness.

1
vote
0answers
13 views

Making color text file using GDAL?

I have an 8-bit greyscale image that I want to convert to a "heat map" based on data values (0-255), using a color ramp. I'm aware that gdaldem works with color-relief, so I used the following steps ...
1
vote
1answer
27 views

PNG driver chokes on raster gdal_transformed to ot byte

I'd like to extract a part of a DEM (data.linz.govt.nz wellinton lidar dem) and analyse it using gdaldem: $ gdalinfo /vagrant/public/assets/GeoTIFFs/17a17d1fae/lenz-mean-annual-temperature.2193.tif ...
0
votes
0answers
9 views

Incorrect Color Palette for Displaying GRIB Data with gdaldem

I'm trying to display temperature values from a GRIB2 file using gdaldem and gdal2tiles.py. Code gdaldem color-relief -b 1 raw.grib2 -alpha t2m_palette_val.txt -of VRT raw.vrt python ./gdal2tiles.py ...
0
votes
1answer
19 views

How to open a .dem file properly?

I have this DEM file downloaded from the internet. It's a text-formatted file and it looks like this: 1440 720 30 -9999 450 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -...
0
votes
0answers
37 views

GdalDEM slope error in Jupyter

I try to calculate slope data. This is the DEM source https://www.earthenv.org/DEM Firstly, I translate data with gdal.Warp according to image UTM zone. Original image .bil extension so first I ...
6
votes
2answers
155 views

Raster antialiasing

I am looking for a way to antialias integer DEM data (hgt file) to float GeoTIFF. That way I want to avoid gdaldem hillshade artefact lines which you can see in this picture: I don't want to blur ...
1
vote
1answer
34 views

ETOPO1 upsampling issue

I am using the OSGeo4W Shell with the ETOPO1, 1 arc-minute global bathymetric data (etopo1_ice_g_f4.flt). I am cutting 256x256 pixel slippy map tiles, and am having a problem with getting smooth-...
3
votes
1answer
149 views

Colorize singleband GeoTIFF raster using Python/GDAL with discrete interpolation like in QGIS

I have singleband raster with min 0 and max 0.82 values. For raster I applied next color scheme in QGIS: I want colorize raster using GDAL command, but receive raster with another color: GDAL ...
1
vote
0answers
84 views

QGIS/GDALDEM SLOPE Output Has Contoured Or Terraced Texture

I have been trying to greatly reduce or eliminate the contour-like texture that appears in my output from gdaldem slope. The image, below, demonstrates this textural effect. The texture of the ...
3
votes
1answer
127 views

Using gdaldem to match cumulative count colouring of QGIS?

I am trying to colour a single band grey raster (NDVI) using gdal to match the same colouring when I bring the raster into QGIS and colour it with a cumulative count cut (2%/98%). When I use the code: ...
1
vote
0answers
156 views

making Color-relief from a rasterfile

I have a tempreture raster file, its min value is -125 and it's max is 50 I want to make a color-relief file of this raster, I tried to use gdaldem to make it. It works but the problem is with its ...
1
vote
2answers
604 views

gdaldem -alpha flag in Python bindings is missing

I've been trying to get the python bindings to work in order to keep the processes in memory, making it faster. I have previously used: subprocess.call('gdaldem color-relief file1.tif -alpha hramp....
2
votes
1answer
149 views

GDALDEM hillshading running slow?

I have, for a while, been trying to make a terrain map using NASA's SRTM 3 dataset. I have a large (13 GB), geotiff projected to web mercator of all the elevation files provided. I have been able to ...
1
vote
1answer
244 views

Losing resolution of my DEM/TIFF when converting from HGT

I need to get a nice hillshade from this area. My steps: 1) Get HGT files from the area: -- phyghtmap --download-only --a -43.7544:-23.2363:-42.0378:-22.3183 --earthdata-user=myuser --earthdata-...
1
vote
1answer
139 views

Python subprocess.call gdaldem module

In python how do I subprocess.call the gdaldem module for color relief? In the command line I would type this: gdaldem color-relief path-to-raster path-to-colorfile path-to-destination-raster -alpha
1
vote
0answers
45 views

gdaldem slope…odd values, almost all 89.98+/- (? - why?)

I'm passing an SRTM1 3601x3601 file to "gdaldem slope".....I've queried the values in Python, they are reasonable (min 222, max 424) for an area of SW Iowa. Took a bit to get the syntax right, but ...
1
vote
0answers
324 views

gdaldem slope calculation noData

I use gdaldem to calculate the slope of a given region. This is the command I use: gdaldem slope -s 111120 -p -compute_edges N34E069.hgt N34E069_slope.tif (I've got the SRTM data from http://...
3
votes
0answers
69 views

gdaldem exact color matching fails

I'm using gdaldem color-relief to read a Uint32 raster and write an RGB tif. The input color_text_file has one line: 102216130 23:105:102 My input file is a single (large) pixel of value ...
2
votes
1answer
134 views

What is the meaning of -32768 in gdaldem color config?

I found a gdaldem color config: 3500 140 140 140 2500 209 209 209 1500 225 225 225 700 245 245 245 0 252 252 252 -32768 213 232 237 <=== What mean -32768
1
vote
1answer
195 views

gdaldem hillshade using command to calculate hillshade of whole folder [closed]

I need to calculate hillshade of folder using gdaldem hillshade which has 60 files in it. How can i do it using command prompt window.
3
votes
1answer
1k views

getting strange “grid” artifacts when creating hillshades using gdaldem

I'm trying to create hillshades from Czech elevation data (Fundamental Base of Geographic Data of the Czech Republic (ZABAGED®) - altimetry - grid 10x10 m) - a demo files is available here: http://...
1
vote
1answer
78 views

gdaldem hillshade stop working with new projection?

Parallel to gdalwarp `-te -5.8 41 10 51.5 -ts 1980 0` not working with mercator? , my hillshade works with lat/long input : gdaldem hillshade input.tmp.tif shadedrelief.tmp.tif -s 111120 -z 5 -az ...
3
votes
1answer
1k views

DEM creation with C++ application

I am implementing a C++ application that must produce DEMs from LIDAR data. I am following the next workflow: Write .las files from lidar data. Use PCL algorithms to transform/filter the point cloud. ...
1
vote
0answers
112 views

hillshade and slopeshade geotiffs fail to convert to new projection using gdalwarp [duplicate]

I'm trying to convert my three DEM products (colour, hillshade and slopeshade; the latter two generated using gdaldem) from EPSG:4326 -> EPSG:3857 using gdalwarp, via the command: gdalwarp -of GTiff -...
2
votes
1answer
773 views

How to extract drainage network through gdaldem

From gdaldem I can view slope, aspect, and hillshade maps. "gdaldem slope manj.tif ouoi.tif -p -s 60" "gdaldem aspect manj.tif gg.tif" "gdaldem hillshade manj.tif hh.tif" Is there any command to get ...
1
vote
0answers
139 views

gdaldem slope attribute passing

How to pass slope attribute to the command "gdaldem slope manj.tif outpiu.tif -p use percent 45 -s 111120/370400" It's giving error like FAILURE: Too many command options. give any ...
2
votes
0answers
374 views

Improve gdaldem hillshade output (lighten up flat parts)

I have a hill-shading that I made using gdaldem hillshade which is already pretty good. I used the option -alt 60 to get nice contrast, but the problem is, that with lowering the light-source, also ...
1
vote
1answer
253 views

Going from hillshade to percent shaded using gdaldem?

I assumed hillshades output percent shaded (scaled to 255) at the given azimuth and altitude but this is incorrect. A flat raster at 80 degrees altitude has a maximum value of 251 instead of 255. How ...
0
votes
1answer
371 views

gdal2tiles.py generating dark tiles from .img file

Dark tiles are generated when I run gdal2tiles.py on a .IMG file(a scanned and georeferenced topographical map). This question advised to apply a color relief map using gdaldem before generating ...
1
vote
1answer
213 views

How can I specify the ranges in the gdaldem's color configuration file?

I want to render an IMG file according to a specific renderer, and export to a jpeg File. I have asked a question about this, and got a satisfactory answer. The issue now is that I need to write a ...