Questions tagged [gdal-translate]

Command line utility to convert raster data between different formats.

Filter by
Sorted by
Tagged with
3
votes
1answer
27 views

Forming a single TIFF image of a Sentinel 2 tile

I downloaded the data using the following command from Amazon S3 bucket : aws s3 cp s3://sentinel-s2-l2a/tiles/51/H/VC/2020/10/19/0/ aus1 --recursive --request-payer. Then translated the 13 bands ...
0
votes
1answer
24 views

gdal_translate outputs coordinates in metres, but I need degrees

I wish to convert a HDF5 file into NetCDF, with the output NetCDF containing the selected band(s) and the latitudes and longitudes. The data provider gives this info about the original file: Table 2. ...
0
votes
0answers
7 views

SoilGrids Python download WebDAV

I am trying to download global GeoTIFFs following the instructions here: https://git.wur.nl/isric/soilgrids/soilgrids.notebooks/-/blob/master/markdown/webdav_from_Python.md However, I get the error &...
1
vote
1answer
26 views

gdal_translate to JPEG has no EXIF in the output

I am trying to create .jpg files that can be consumed on the web from a .tif image. I would like to rely on EXIF data about the image metadata, however, I fail to read any. What am I doing wrong? $ ...
1
vote
1answer
10 views

How to write gdal_translate output from memory directly to s3

I'm trying to convert a .tif to .mrf format using Python gdal bindings. I'm doing the conversion in memory using /vsimem then attempting to write directly to s3. The problem is only the .mrf file gets ...
1
vote
1answer
34 views

Google Earth Engine error message “Error: Input has missing or invalid affine transform”

Firstly, apologies for repeated question - this question was already asked over at Google Earth Engine error message “Error: Input has missing or invalid affine transform” [duplicate] where the only ...
1
vote
1answer
47 views

gdalwarp DEM with different resolution extents

I'm trying to convert DEM source (LIDAR is original source, in ASC format) to a custom internal format that has specific resolution and alignment values. I also want to generate different output ...
1
vote
0answers
39 views

gdal_translate VRT to TIF has sub-pixel shift [closed]

Problem: While combining 2 tif images using gdalbuildvrt and gdal_translate, the output tif has sub-pixel shift. (GDAL 3.1.1, released 2020/06/22) File names: input files: input1.tif, input2.tif input ...
1
vote
1answer
79 views

GeoTIFF to ENVI GDAL translation causes rotation

I have a GeoTIFF(you can download it here ~16MB) which I want to convert to ENVI raw. I'm using this GDAL command: gdal_translate -ot UInt16 -scale -of ENVI -outsize 1025 1025 dgm1_32372_5680_2_nw.tif ...
2
votes
1answer
35 views

GDAL GeoTIFF to GeoPackage overview building failed error

I have multiple GeoTIFFs in UTM projection. I need to create GPKG SQLite databases. I noticed that some (Example3) conversions are failing with overview error. What is cause for the failure ? How ...
1
vote
0answers
40 views

Can GDAL run XML Composition File for GeoPDF from command line?

The documentation page for PDF via GDAL includes the description for using an XML Composition File: https://gdal.org/drivers/raster/pdf.html#creation-of-pdf-file-from-a-xml-composition-file-gdal-3-0 ...
0
votes
0answers
28 views

Converting from 16-bit TIFF image to 8-bit with GDAL does not work properly

I am a beginner in the area of GIS and remote sensing image analysis. I am dealing with the satellite images from the **VNP46A1 Daily At-sensor TOA Nighttime Radiance Product. I want to get the TIFF ...
0
votes
0answers
30 views

Warping radar maps for overlay into Google Maps

For a small project I'm looking to add various weather maps to overlay on Google Maps. I've can pull several maps from various sources, however I also know that they are not in the right projection ...
1
vote
1answer
43 views

Asking for the precise detail of gdal_translate's output .xyz multiband file format (when converting from GRIB)

gdal_translate is able to convert a multidimensional GRIB data file (Copernicus ERA5 reanalysis) with the following command-line command (gdal_translate.exe from 11/2016): gdal_translate source.grib ...
0
votes
0answers
28 views

Image equalization after tiling, using gdal_translate -scale

I want to generate a set of samples from a Sentinel-2 image by tiling it, using mainly gdal_translate. The tiling is ok, but its histogram seems to vary tile to tile. So, what I thought was to apply ...
1
vote
0answers
86 views

Convert GeoTIFF to NITF

This should be very straightforward, but I can't seem to find this exact conversion scenario. I understand pixel / row / and lat and long coordinates but it seems like none of these values agree with ...
0
votes
2answers
76 views

How to resample a raster considering a minimum number of valid pixels

I'm looking for a function to resample a raster that can consider a minimum number of valid pixels in order to compute the new pixel value. E.g. If I have to resample a raster of 300m/px to 1Km/px I ...
2
votes
1answer
71 views

gdal translate resampling -r flag has no effect?

Whenever I add a resampling parameter (-r) to my gdal_translate commands, it seems to have no effect. For example the following two commands produce a binary exact result. How can I get my image to ...
1
vote
0answers
35 views

Python GDAL resampling incorrectly: masking actual data points

I am trying to resample GeoTIFF image from 460 m resolution to 500 m using the Python gdal library. But somehow GDAL is not resampling correctly. It is also resampling noData values, so resulting ...
1
vote
2answers
85 views

What can I do with gdalwarp that I can't do with gdal_translate, and vice-versa?

I'm new to GDAL and its utilities. My experience with both these programs (Warp and Translate) doesn't go much further than doing some image clipping, whether by coordinate's bounding box (that I do ...
0
votes
0answers
41 views

Problems georeferencing an image in QGIS with subprocess.popen() and gdal_translate

I want to georeference a raster using GDAL in QGIS 3.10's Python console. When I use the plugin I get the following script (leave only two GCPs to make it easier to read): gdal_translate -of GTiff -...
1
vote
1answer
43 views

Using GDAL to crop an SRTM DEM file from GeoJSON and translating it to bmp

I have a simple polygon shape in a GeoJSON file. { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "Polygon",...
0
votes
0answers
43 views

Controlling number of gdal_translate cores when started via R's gdalUtils

I am processing satellite data in R and need to merge sat images of different UTM zones, which is where I ran into unexpected problems. I think I have solved them, but before moving to the production ...
0
votes
0answers
31 views

How to correctly translate an unprojected PNG image with known bounding coordinates using gdal_translate?

The attached image (original.png) has the following information: UL_lat: 67.02283275830867, UL_lon: -39.5357864125034, UR_lat: 67.62103710275053, UR_lon: 57.81196475014995, LL_lat: 31....
0
votes
0answers
34 views

gdal_translate of Tiff to gpkg with only one band and preserving of the nodata

I try to use gdal_translate in my windows command prompt to convert a single band .tif raster to a single band .gpkg. gdal_translate -of GPKG example.tif example.gpkg I always get a .gpkg with four ...
1
vote
0answers
28 views

Accessing bands of a NetCDF by datetime in Python

I want to write each band as a separate file (after gdal.Translate operation). So I can directly address to each band by datetime, not by a number? The second way, more sophisticated is to get all ...
0
votes
1answer
23 views

How to read a RasterBand as Dataset to use in gdal.Translate as source?

I need to translate each band of netcdf file to other format. How can I get raster.GetRasterBand() not as a band object, but as a dataset ot otherwise to use it in gdal.Translate(dst,src) as src?
0
votes
0answers
14 views

How can I understand the GDAL reprojecting process script?

I'm working with dataset reprojection using GDAL, specifically with netCDF files from GOES-16. The procedure consists of enter with that file in a script Python to transform the spherical view into ...
1
vote
0answers
32 views

Using gdalwarp and gdal_translate to create a KMLSUPEROVERLAY with a trasparent background from a GeoTIFF

I attempting to create a KMZ file with an image overlay that has a transparent background. I'm using a GeoTIFF exported from the CoastWatch Utility Link to TIFF file:https://drive.google.com/file/d/...
1
vote
1answer
149 views

How to calculate affine transformation by Python gdal as same as gdal_translate?

I've made a python script which tries to reproduce what gdal_translate does (given a bounding box BBOX in EPSG:4326 and an UTM32 .jp2 file. Then, translates the BBOX from EPSG:4326 to EPSG:32632 (...
0
votes
0answers
47 views

Error with gdal_translate in R

I am trying to mosaic very large rasters in R. My code, taken from this helpful answer, worked perfectly for 3 test rasters (50 MB, 50 MB, 120 MB), but when I tried a larger test on 7 rasters (...
0
votes
1answer
38 views

QGIS Tools Change Raster Values

I am creating NDVI from Sentinel2 bands 8 and 4 on QGIS, using the raster calculator, but I need to convert the format or clip to a polygon beforehand, because my computer crashes if I try to perform ...
1
vote
1answer
257 views

How can I improve performance of gdalwarp and gdal_translate pipeline?

tl;dr: I can't get gdal_translate to use multiple cores. How to fix? I am using gdalwarp followed by gdal_translate to process a large GeoTIFF by first cropping to a polygon cutline and outputting a ...
0
votes
0answers
20 views

Georeferencing is not proper using gdal_translate and gdal_wrap

I am trying to georeference the image using GDALs gdal_translate based on GCPs . gdal_translate.exe \ -gcp 74.7768075314135 264.327152578751 622092.704992045 3065789.47975504 -gcp 245.39164998501 444....
0
votes
0answers
34 views

Convert grib to image using custom color scale?

I'm working on generating full color radar maps from a grib file. Example of the output I'm trying to create is here: https://boozedog.com/stuff/colorful.png Here's the input grib I'm using: https://...
0
votes
0answers
29 views

Is it possible to extract wavelength from pixel values?

I am new here to GIS and believe this can be better worked-out here than SO, but please do correct me if I am wrong. I am working with Python to review metadata of satellite images. Specifically, I ...
0
votes
1answer
26 views

Geo .PDF to .tiff background colour

I have a geo-referenced pdf that I'm transforming into .mbtiles or .tiff using gdal_translate 00989I11.PDF 00989I11.tiff The problem is that the result does not have a white background as I would ...
0
votes
1answer
170 views

How to install MrSID support for GDAL on Ubuntu

I'm trying to convert some MrSID files to GeoTiff format. They are mostly over 20GB each. It seems the best way to do this is to use gdal_translate with the MrSID drivers. Unfortunately, I can't find ...
0
votes
1answer
77 views

How to use GDAL /vsizip/ to access GML file(s) from Sentinel-2 zip package

Which is the correct way to write the path through the *.Zip S2 imagery package to rich the *.GML vector file(s) ? Does someone knows how to correctly write the path to *.GML file for using it with /...
0
votes
1answer
129 views

Split a GeoTIFF (BigTIFF) file into subsets with a specific overlap in Python

I have a BigTIFF file that I need to split into tiles with a set tile size and overlap. I have a script for this using PIL: tile_height = tile_width = 1000 overlap = 80 stride = tile_height - ...
0
votes
1answer
90 views

Landsat 8 Imagery not Creating Composite RGB Image with Pansharpening Correctly

I am having some serious problems attempting to merge the R,G,B bands from Landsat 8 and then apply pan sharpening to them. Unfortunately, I am not familiar enough with the process to figure out ...
1
vote
0answers
56 views

gdal_translate or gdalwarp: Preserve noData value when using DISCARD_LSB option

I want to reduce the file size of a 32bit floating point 1-Band GeoTIFF file that currently uses -99 for noData pixels. The relevant part from gdalinfo -mm: Band 1 Block=256x256 Type=Float32, ...
0
votes
2answers
94 views

Stacking a raster with GDAL in python - vrt, translate, merge giving errors

I'm trying to create a composite of all my sentinel bands into one tif in python. I've tried doing a few things but nothing seems to be working. I am using an arcpy python environment as I need a few ...
1
vote
0answers
58 views

gdalwarp from EPSG:4326 to EPSG:3031 contains no data

I have a high resolution, optimized GeoTiff file in EPSG 4326 that I want to reproject into several other projections. Target projections EPSG:3857 (Mercator) and EPSG:3413 (Arctic stereographic) work ...
1
vote
1answer
471 views

GDAL translate in python - where do I find how to convert the command line arguments to use in python scripts? [duplicate]

I'm trying to use gdal.translate() to convert a raster from unit16 to int16 and I am trying to figure out what arguments to use. I think in the command prompt version I would use -ot Int16 but that ...
1
vote
0answers
121 views

From many raster tiles to one geopackage

I need to unify many raster tiles of global land use (856 tiles, in a total of 297 GB, single band, 8 bite unsigned integer, WGS84) in a single file, I chose geopackage because of the high dimensions. ...
3
votes
1answer
62 views

Write output of multiple files to a directory using glob.glob after processing?

I want to convert the data type (Int32 to Float32) of all the tiff images in a directory 'F:\\prep\\input\\' and save/write the outputs to a new directory 'F:\\prep\\converted\\'. I have tried using ...
0
votes
0answers
36 views

Issues translating 16-bit Int (NetCDF) to GeoTIFF with gdal_translate

I am attempting to translate the .nc dataset to GeoTIFF but run into issues with the colors of the final TIFF file. It is a 1-band dataset (lat, lon, temperature (K). Command I am using: ...
0
votes
0answers
23 views

Convert 1-band .nc file to GeoTiff with RGB

How can I convert 1-band .nc file to GeoTiff with RGB? I have tried using gdal translate but it won't let me apply color interp of RGB to the .nc as it has 1 band.
1
vote
2answers
83 views

gdal_translate: error 1: Could not find an appropriate zoom level

I'm trying to put a jpeg file (a map) into Sqlite mbtiles. The command: gdal_translate -gcp 0 0 6.756394 45.192361 -gcp 0 1080 6.756394 45.127057 -gcp 1820 0 6.912606 45.192361 -gcp 1820 1080 6....

1
2 3 4 5
8