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 EPSG 3857 projection. So it's meter based. Also the elevation data inside the geotiff is meter based. So we would expect that a -s of 1 (which is default) should be ok, right? Horizontal and vertical units are the same. If we provide a -s of about 0.8, it seems to be ok.
As reference we use: https://www.openslopemap.org/karte/
This is the gdalinfo for one of our files. We have a lot of them though. All in the same project and world-wide. So some at the equator and some very far away.
Would be great to know what we are doing wrong. If our projection is just not the right one for the job.
gdalinfo ktn_dgm5m_wm.tif
Driver: GTiff/GeoTIFF
Files: ktn_dgm5m_wm.tif
Size is 55022, 25272
Coordinate System is:
PROJCS["WGS 84 / Pseudo-Mercator",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["X",EAST],
AXIS["Y",NORTH],
EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],
AUTHORITY["EPSG","3857"]]
Origin = (1407137.000000000000000,5965203.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
AREA_OR_POINT=Area
DataType=Generic
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 1407137.000, 5965203.000) ( 12d38'25.90"E, 47d 8'29.44"N)
Lower Left ( 1407137.000, 5838843.000) ( 12d38'25.90"E, 46d21'49.72"N)
Upper Right ( 1682247.000, 5965203.000) ( 15d 6'42.77"E, 47d 8'29.44"N)
Lower Right ( 1682247.000, 5838843.000) ( 15d 6'42.77"E, 46d21'49.72"N)
Center ( 1544692.000, 5902023.000) ( 13d52'34.34"E, 46d45'14.63"N)
Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
NoData Value=-3.4028234663852886e+38
Metadata:
RepresentationType=ATHEMATIC