Questions tagged [gdal-translate]

Command line utility to convert raster data between different formats.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Use of gdal.TranslateOptions in python - scale values to 8 bit

I am trying to write a script in python that does some processing on raster files: Convert to 8 bit, compress to LZW and specify tiles size. My script does everything except scaling correctly from 16 ...
0 votes
1 answer
23 views

gdal_translate (python) seems to fail with (arbitrarily?) different window

I'm trying to take a satellite image tile (Sentinel 2, product 2A) and crop it to a smaller window using lat lon coords. I've created a tiff image combining all of the different Sentinel 2 bands using ...
1 vote
1 answer
20 views

Raster Conversion Translate to 16 bit Tiff with custom min/max values

I'm new to QGIS. I have some bathymetric data of Australia I'm trying to output as a high bit depth Tiff, however it's not coming out the way I want. In QGIS I have set the singleband grey to a custom ...
  • 11
1 vote
0 answers
25 views

GDAL - NetCDF to colorized raster

I have a NetCDF file that is satellite imagery. I would like to convert it to a raster image, with color, using gdal on the command line. Here is what I have so far: gdal_translate -unscale NETCDF:&...
0 votes
1 answer
34 views

Float32 to UInt16 terracing problem [closed]

I have the same initial problem as the links below, but I cannot change to using float32 as I am not using Blender. Terracing / stepping artefacts after converting lidar DTM from float32 to uint16 ...
0 votes
1 answer
43 views

How to get the Minimun and Maximum zoom level by coordinates

I am new to GDAL, using the below commands I was able to generate tiles for a particular image. After the image is tiled the min and max zoom levels are decided based on the coordinates provided. My ...
  • 1
4 votes
1 answer
88 views

How to show pixel boundaries of a given raster in QGIS?

The Norwegian Meterological Institute provides historical weather data. I download one of these .nc files: curl https://thredds.met.no/thredds/fileServer/ngcd/version_22.09/RR/type2/2022/08/...
  • 400
0 votes
1 answer
31 views

Terracing and data format issues when converting DEM from float32 to UInt16

I have spent quite a bit of time trying to figure this issue out; I was hoping someone on here could give some advice on what to do. I am having issues with terracing on my 3D model in Blender and I ...
0 votes
0 answers
23 views

GDALWarp Reprojecting raster extent from (0, 360) to (-180, 180) filling left hemisphere with blank data

Understanding that this question has been asked a few times (Reprojecting raster from 0 360 to -180 180 with cutting 180 meridian using gdalwarp seems to be the canonical one), I've found that any ...
0 votes
0 answers
19 views

Setting CRS name for GRIB file

I am creating some Grib files by reading data into a MEM-Driver Dataset and subsequently converting them to GRIB2 format using GdalTranslate. Everything works fine except that my CRS WKT is not as ...
1 vote
1 answer
30 views

Any way to merge tifs with overviewsm or overvies alone

I have a large dataset of tif images with external overviews. Is there any way to merge these images to one bigtiff including the overviews? Using vrt and gdal_translate doesn't seem to be working. ...
  • 41
1 vote
1 answer
17 views

gdal_translate reading unexpected values from NetCDF

I'm trying to generate separate files from the layers of a NetCDF downloaded from ECMWF's Copernicus data archive (https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels). I ...
1 vote
0 answers
20 views

Tile GeoTIFF images in locations far from each other in one layer

How to tile two aerial TIFF images from two cities in one layer? I understand that first, I should create a virtual layer (vrt) and then tile it after reprojection. However, gdal2tile creates too many ...
1 vote
1 answer
72 views

Merging two overlapping NetCDF files

I'm not an expert on this kind of stuff. Basically I'd like to merge two .nc files, one from GOES-R G16 and the other from GOES-R G17. The files contain the same variables and refer to the same time; ...
  • 63
0 votes
0 answers
16 views

gdaltranslate loop for compressing .tif

I'm looking to do a batch file for running a loop to all the .tif images that I have in a folder. I´ve been trying to do this: for %%v in (*.tif) do gdal_translate -if Gtiff -of Gtiff -b 1 -b 2 -b 3 -...
0 votes
1 answer
48 views

Unable to merge TIFFs in one file using Warp and QGIS

I have three TIFFs are below which is belongs to Alaska HI Chart: First https://drive.google.com/file/d/1KllacOdKNw866doqjMcounsvofpXBgFh/view?usp=sharing Second https://drive.google.com/file/d/...
0 votes
0 answers
56 views

Spatial offset when using gdal_translate with projwin

I am using gdal_translate with a custom projwin to select a subwindow from an ESA WorldCover source dataset. The dataset comes in EPSG:4326 and the command looks as follows: export AWS_NO_SIGN_REQUEST=...
  • 5,083
0 votes
0 answers
68 views

gdalwarp reproject "Lambert Conformal Conic" to EPSG:4326 and stretch vertically to avoid shape distortion

I am trying to convert "Lambert Conformal Conic" into "map-like" representation (which is EPSG:4326 as far as I understood), so I used gdalwarp -t_srs EPSG:4326 -of GTiff /tmp/src....
0 votes
1 answer
119 views

gdal_edit not find as internal command in Python

I am writing the geoinformation using the gdal_edit command using python in Jupyter notebook. Below is the syntax. !gdal_edit -a_ullr -1.149576 85.247405 -92.762859 88.022318 -a_srs "+proj=...
0 votes
0 answers
124 views

GDAL/Python : converting Zarr to TIFF

I have a Zarr file stored on a S3 custom storage (not AWS), that I want to save as a TIFF file locally. I'm trying to use GDAL for the first time here so I don't fully understand the methods. So far, ...
  • 39
1 vote
1 answer
76 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 ...
  • 431
0 votes
1 answer
46 views

ERROR 1: Too many points (441 out of 441) failed to transform when using gdalwarp to convert raster with compound projection

If I use gdalwarp to convert a simple ArcInfo ASCII grid with a compound projection (Geographic horizontal/meters vertical) to a GeoTIFF, I get an error message. Here's the input raster (asc_h84deg_vm....
  • 431
0 votes
0 answers
35 views

Georeferencing with gdal_translate and gdalwarp fails

I have been struggling with the georeference plugin in QGIS 3.24 Tisler in Ubuntu (and also in Windows, although it doesn't crash on the latter); first I thought it was my dataset but then tried to ...
  • 3,344
0 votes
0 answers
63 views

GDAL Inverse Coordinate Translation

I have data in WGS84 and when I translate it to ED50 it doesn't appear in the correct place using GDAL and C#. I use CoordinateTransformationOptions.SetOperation using c# to set the specific ...
0 votes
0 answers
50 views

Setting Output Data Type in ArcPy GDAL

I'm using ArcPy through a notebook in ArcGIS Pro 2.9.3. I'm trying to use gdal.Translate and gdal.TranslateOptions to translate a .tif file to a 32 bit signed integer .rst file. I've been able to set ...
  • 181
0 votes
0 answers
82 views

Georeferencing Google Map image with GDAL, display coordinate values in WGS84

Framing this post with the question first. Question Can a GeoTIFF based off of the Google Mercator projection be warped or transformed to display WGS84 lat/long coordinates as opposed to northing/...
0 votes
1 answer
131 views

Converting a NetCDF with multiple variables to GeoTIFF calling GDAL_TRANSLATE function from Python

gdal_translate -a_srs EPSG:4326 NETCDF:"file_name.nc":variable_name output_file_name.tif -a_ullr -9.21200 53.28058 -8.88045 53.11338 I am working on some NetCDF files that include multiple ...
0 votes
1 answer
154 views

gdal_translate TIFF to PNG with added alpha

I am using gdal_translate to create a Cloud Optimized GeoTIFF: gdal_translate ${lvl2_cub} ${tifname} \ -co COMPRESS=LZW -co TILED=YES -b ${gdalidx} -co BIGTIFF=YES \ ...
  • 4,349
0 votes
0 answers
20 views

GDAL_translate and HEGtool

I am using GDAL to convert a huge dataset of HDF into GEOTIFF. When I tried with the HEG tool the tiff file was according to my requirements, but when using GDAL I think the projection gets shifted ...
1 vote
1 answer
41 views

Scaling problem when projected map is overlaid on basemap in QGIS

The problem My georeferenced and projected Matplotlib map overlays with an offset on a basemap projected in QGIS with the same coordinate reference system. What I did: I created a map in Matplotlib ...
0 votes
2 answers
32 views

Doubling of filesize with GDAL after transformation despite similar compression

I am trying to process an elevation model in COG with GDAL using gdalwarp and gdal_translate, to change the height values from AHD (australian height datum aka sea level) to ellipsoid. The ...
  • 651
1 vote
0 answers
108 views

GDAL GeoTIFF compression from WEBP to JPEG/LZW creating tile-edge artefacts when adding overlays

Desired Outcome An JPEG or LZW compressed output tiff with overlays, with transparent "no data" zones, and no black "edge artifacts" on the border between "data" and &...
  • 31
0 votes
1 answer
60 views

Is there any way of making gdal_rasterize or gdal_translate create transparent pixels on the output image created?

I'm using the gdal_rasterize to create a TIFF file from a GeoJSON input and gdal_translate to convert the TIFF file to PNG. The code that I'm using is the following: gdal_rasterize -burn 0 -burn 0 -...
  • 1,041
0 votes
0 answers
56 views

Use in-memory objects to process raster maps using GDAL's Python API

Below are three GDAL supported raster map processing commands, set inside a Bash shell helper function, defined inside a script that'd patch ERA5-Land with ERA5 data (see also: Merge ERA5-Land and ...
0 votes
1 answer
59 views

Unable to make GeoPackages and MBTiles compatible in MapTiler Cloud using gdal_translate

I'm using gdal_translate to convert TIF files to GeoPackage and MBTiles. The geopackage/MBTiles are uploaded to MapTiler Cloud. They upload to MapTiler Cloud even if they are not "clean tileset&...
  • 1,169
0 votes
0 answers
20 views

gdal_translate with aux.xml as input

I'm trying to translate a tif file to EPSG3857 system. I have an .aux.xml file that contains GCP pairs generated from ArcGIS after georeferencing. I know that gdal_translate could take GCP pairs as ...
  • 277
2 votes
1 answer
189 views

Create rectified GeoTIFF given aux.xml produced from ArcGIS

I'm trying to create the rectified GeoTIFF image, given a raster TIFF image and aux.xml file generated from ArcGIS. The aux.xml contains information about the mapping from raster TIFF image to the ...
  • 277
0 votes
0 answers
42 views

Is it possible to pre-filter band values from WMS/TMS wit GDAL?

Context: I am downloading some raster data from a WMS (TMS actually) by using gdal.translate() in python. Afterwards, since I am only interested in the highest values of the RGB raster bands (band ...
1 vote
0 answers
42 views

Terrain correction in SAR image

I am new to the gdal utility. Using DEM data of the Moon, I am trying to perform terrain correction on SAR images. I have a DEM file and SAR data into tif file format. Both DEM and tif file are in ...
0 votes
1 answer
98 views

How to mosaic Sentinel bands with correct order in GDAL

I'm new with GDAL and I'm trying to mosaic different bands from Sentinel 2 in order, what I want to get is a raster file with right order band2, 3, 4, 5, 6, 7, 8, 8A, 11, 12. The picture below is the ...
1 vote
1 answer
80 views

gdal_translate on WCS: Unable to export GeoTIFF files with zero bands

In accordance with GDAL's WCS examples, I am trying to use gdal_translate to import a GTiff raster from a coverage. The server in question is a GeoServer instance of the German Weather Service (DWD) ...
0 votes
0 answers
49 views

How to convert transverse_mercator to regular lat/lon

I want to transform this file from transvers_mercator to a regular lat/lon netcdf file. My input file: netcdf toto { dimensions: x = 548 ; y = 704 ; variables: char transverse_mercator ; ...
  • 1
1 vote
0 answers
153 views

Using GDAL translate with VRT - merge error in overlap creates black 📦

I have a series of hi resolution multispectral images from Maxar's WV2 in .NTF form. I am trying to stitch tiles together to create a single image, and I've been having a lot of trouble. I initially ...
1 vote
1 answer
1k views

Installing GDAL on MacOS with Homebrew?

I am trying to install GDAL on MacOS with Homebrew. But failed. I started with the following commands: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install....
0 votes
0 answers
15 views

Create .tif file no external Files but with colors & classnames: gdal

I am used to using .img ERDAS native files and all you get is a .img. When you open the .img there are class names, colors ect., however you have set up your attribute table. I want that in geotiff ...
  • 92
0 votes
0 answers
375 views

Removing Alpha Band using GDAL results in black nodatafill

In QGIS I have saved a raster that I styled as a Rendered Image. This saves me the trouble of uploading a style on geoserver and applying the style to the geotiff. It should also decrease the file ...
  • 61
1 vote
1 answer
133 views

Cropping with GDAL python outputs a black section in the image

I am trying to crop an image using GDAL python. I have tried using both gdal.Warp and gdal.Translate, and both keep bringing the same result. I have an image that I have orthorectified using gdal.Warp ...
0 votes
1 answer
107 views

gdal.Translate results in a raster which has another extent

My input is this file which gives me an output file through the code: inputraster=gdal.Open('input_file.tif'),gdal.GA_ReadOnly) optt=gdal.TranslateOptions(format='PCRaster',bandList=[1],outputSRS='...
2 votes
0 answers
107 views

GDAL warp and translate on EASE-2 crossing the IDL

I have some GeoTIFF data defined on an EASE-2 grid that I would like to convert into a PNG image using the WebMercator projection. gdalwarp does the job quite well except for a few files that cross ...
0 votes
0 answers
36 views

Gdalwarp for terrain correction in SAR image

I am new to the gdal utility. Using DEM data of the Moon, I am trying to perform terrain correction on SAR images. Here is gdal commandline code ``` !gdalwarp -multi -wo NUM_THREADS=ALL_CPUS -co ...

1
2 3 4 5
11