Skip to main content

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.

Filter by
Sorted by
Tagged with
2 votes
0 answers
31 views

gdaldem hillshade leaves holes in map at hill shadows

I have followed the install guide for OpenTopoMap exactly, this can be found here: https://github.com/der-stefan/OpenTopoMap/blob/master/mapnik/README.md#compile-and-install-mod_tile When I view the ...
Davin Hansen's user avatar
0 votes
1 answer
442 views

How to pass options in Python GDAL binding?

I am trying to color a GeoTIFF file and convert it to PNG. Several thread (1, 2) have pointed the gdaldem function. Here I am now porting the function to Python. Using the documentation, I can pass ...
Nikko's user avatar
  • 611
1 vote
1 answer
623 views

How to use GDAL with Python to make a GeoTIFF file smaller?

I have a GeoTIFF elevation DEM raster file with x & y dimensions of 32,412 each. I'd like to reduce the dimensions of the file x & y dimensions to 14,142 without cropping or losing any more ...
Matt R's user avatar
  • 45
2 votes
0 answers
261 views

Convert EPSG and vertical datum of a DEM file

I have DEM files that are in EPSG:4326 - WGS 84 and use latitude and longitude for coordinates. The elevation units are in meter but use the WGS84 ellipsoid with WGS84 elevation. I want to convert ...
ParcoMolo's user avatar
0 votes
0 answers
27 views

What is cell neighborhood size in gdaldem?

I would like to know the cell neighborhood size used in some of the utilities in gdaldem. I can't seem to find them in the documentation. For example, TRI has per definition 8-cell neighborhood size, ...
RimoDino's user avatar
0 votes
0 answers
64 views

30m SRTM DEM is displacing incorrectly with coordinate range error in QGIS

I am trying to import DEM data to QGIS. Firstly, I have downloaded it from https://dwtkns.com/srtm30m/. For instance, I have N35E117 here in QGIS with corner coordinates: Corner Coordinates: Upper ...
Zizheng Yang's user avatar
1 vote
1 answer
754 views

In gdaldem: NODATA value in GeoTIFF found in earlier version but not recognized in GDAL 3.4.2

I'm not sure if this is something that has improved in GDAL or something that could/should be fixed. I have a particular GeoTIFF here that has values (-32767) that are supposed to represent NODATA ...
Burrow's user avatar
  • 441
0 votes
0 answers
101 views

Problem with gdaldem slope -> result is off by some degrees

We are currently having some issues with gdaldem slope. We'd like to create a slope map of a geotiff, but the result seems to be some degrees off to what it actually should be. Our input geotiff is in ...
Georg's user avatar
  • 1,001
0 votes
0 answers
2k views

Use BIGTIFF=YES creation option. NOT WORKING

I am busy trying to merge 62 DEMs (totaling in 5.6 GB and in GeoTIFF format) in QGIS 3.18 to create a single DEM of southern Africa. The problem was that the tiff I was trying to generate was larger ...
Ruan Booysen's user avatar
3 votes
1 answer
295 views

Generating vector slope maps using GDAL

I have a DEM file that I created a slope map of using gdaldem slope. This works fine and if I view and colorize it, I can now see how steep a hill is but now I'd love to create a shapefile out of that....
Georg's user avatar
  • 1,001
1 vote
0 answers
2k views

gdaldem - raster to RGB raster with color-relief

I have 6-layer raster with float value. I have six different QGIS style with color value. Here is image value from QGIS: Here is a QGIS style (for 6 layer): <!DOCTYPE qgis PUBLIC 'http://mrcc.com/...
user153770's user avatar
0 votes
0 answers
409 views

Creating color relief from GeoTIFF using gdaldem returns font name

I'm trying to generate a color relief map from a SNODAS greyscale geotiff file scaled from 16-bit to 8-bit. Given the type of data and the scaling, it seems the pixel values are set at 1-5, with 5 ...
alexandersupertramp's user avatar
2 votes
1 answer
724 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 ...
alexandersupertramp's user avatar
1 vote
1 answer
282 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 ...
adminopasswordo's user avatar
0 votes
1 answer
170 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 -...
Damian Radinoiu's user avatar
0 votes
0 answers
228 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 ...
Iroh's user avatar
  • 159
6 votes
2 answers
693 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 ...
Martin Ždila's user avatar
1 vote
1 answer
431 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-...
OrangeWombat's user avatar
3 votes
1 answer
2k 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 ...
spatialhast's user avatar
  • 3,641
1 vote
0 answers
252 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 ...
Ethan's user avatar
  • 51
4 votes
1 answer
623 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: ...
Emtomp's user avatar
  • 543
1 vote
0 answers
384 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 ...
Majid Hojati's user avatar
1 vote
2 answers
2k 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....
AlexVestin's user avatar
2 votes
1 answer
337 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 ...
AlexVestin's user avatar
1 vote
1 answer
756 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-...
Magno C's user avatar
  • 2,150
1 vote
1 answer
384 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
lvhk2's user avatar
  • 11
1 vote
0 answers
144 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 ...
Timbo1711's user avatar
1 vote
0 answers
821 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://...
M F's user avatar
  • 271
3 votes
0 answers
232 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 ...
Charlie Lefrak's user avatar
2 votes
1 answer
278 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
Gerd's user avatar
  • 751
1 vote
1 answer
311 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.
Ahsan Mukhtar's user avatar
5 votes
2 answers
3k 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://...
rist's user avatar
  • 153
1 vote
1 answer
116 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 ...
Hugolpz's user avatar
  • 2,653
3 votes
1 answer
2k 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. ...
cpiury's user avatar
  • 315
1 vote
0 answers
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 -...
jeremyeastwood's user avatar
2 votes
1 answer
1k 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 ...
user28536's user avatar
  • 421
1 vote
0 answers
176 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 ...
user28536's user avatar
  • 421
3 votes
0 answers
542 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 ...
Georg's user avatar
  • 1,001
1 vote
1 answer
387 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 ...
ideamotor's user avatar
  • 193
0 votes
1 answer
639 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 ...
Allan Oware's user avatar
1 vote
1 answer
520 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 ...
Devdatta Tengshe's user avatar