Questions tagged [gdal-translate]
Command line utility to convert raster data between different formats.
527
questions
0
votes
1
answer
15
views
GDAL predicator and Tile Offsets
I would like to "shift" the origin of a BigTIFF file. But is is not so easy. So instead, I try to use gdal_translate to create a new file. But when I compare the original file and the ...
1
vote
1
answer
32
views
Batch convert .img to GeoTIFF using gdal_translate on Mac [closed]
I want to convert all the .img in a folder and subfolfers to GeoTIFFs.
I do this regularly with gdal_translate for a single file:
gdal_translate -of GTiff input.img output.tif
I'm trying to find out ...
2
votes
1
answer
91
views
gdal_translate gives "FAILURE: No target dataset specified." error
I want to reduce the size of a GeoTIFF to 10% of it's original size. Here's the command I tried:
gdal_translate -outsize 10% orig.tif orig-small.tif
When I run that command, however, I get this error:...
0
votes
0
answers
44
views
Converting NetCDF to GeoTIFF WGS 84
I would like to convert the next NetCDF file to a GeoTIFF WGS 84.
NetCDF file gdalinfo output:
Driver: netCDF/Network Common Data Format
Files: /home/me/netcdf_file.nc
Size is 512, 512
Metadata:
...
1
vote
2
answers
21
views
Sentinel2 picture download, the resolution is not high quality
I want to download a JPEG from this service:
https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/export?bbox=25.158691,43.381098,30.267334,48.421910&size=1024,1024&...
0
votes
0
answers
25
views
gdal_translate from .vrt doesn't reproject tiles, but .vrt has right projection
Translation of a big .vrt (tiles are .bil in EPSG:4326, .vrt has ESRI:102027) file results in a wrong raster with EPSG:4326 projection.
Command here is
gdal_translate -of GTiff -ot Float32 $INPATH/...
0
votes
1
answer
20
views
How .vrt file paths should be corrected if the file was created previously from other machine?
I have a .vrt file with some SRTM tiles created from windows PC, so paths there are like:
<SourceFilename relativeToVRT="0">Y:\srtm_eurasia\Env\EarthEnv-DEM90_N55E120.bil</...
1
vote
0
answers
34
views
GDAL: TIFF image black color rbg(0,0,0) changes to white at zoom in levels)
Gdal: QGIS is changing black/white color for no data values at different zoom levels for a TIFF image - why does this happen, and how to solve it?
The image is a GeoTIFF with LZW compression. The data ...
0
votes
1
answer
33
views
gdal_translate closes without any error when translating a big tif to map
I run gdal_translate from powershell for file:
Size is 32571, 35947
Coordinate System is:
PROJCS["Asia_North_Lambert_Conformal_Conic",
GEOGCS["WGS 84",
DATUM["WGS_1984&...
0
votes
1
answer
130
views
"ValueError: Received a NULL pointer." When I use gdal.Translate
I am trying to create a Geotiff using gdal.Translate but I am getting the error:
return TranslateInternal(destName, srcDS, opts, callback, callback_data)
ValueError: Received a NULL pointer
dem = ...
2
votes
0
answers
66
views
Speeding up WarpedVRT in rasterio (change CRS + resample)
Given a source GeoTIFF of some unknown resolution (better than the target), what is the quickest way to re-project it in-memory to the desired GSD? Masking in the input data should be preserved.
...
0
votes
0
answers
48
views
GeoTIFF retiling
I have a set of worldcover 3x3 degree GeoTIFFs and I am trying to break them down into 1x1 degree files to match the DEM files I have. The 3deg tiles have 36000 rows and 36000 cols. I used ...
0
votes
2
answers
115
views
Downloading Global SoilGrids Data through WebDAV
I am attempting to download global SoilGrids data, following the tutorial for R. I want to download a full global map at 250 m resolution. Eventually I want to reproject it to EPSG:4326 but first I am ...
1
vote
1
answer
39
views
Setting an explicit scale when translating GeoTIFF to PNG
When converting to PNG I'd like to convert the height of the GeoTIFF (which is a float) to UINT16, but also setting the maximum range to 5500, by clamping any values smaller or larger to min or max ...
1
vote
0
answers
66
views
Translating a JPG + JGW to a JP2 File
I have a couple of files (one .jpg file and one .jgw file) that I would like to translate to a .jp2 file format. I need the .jp2 file format because the pipeline I'm working on uses that file format ...
0
votes
1
answer
23
views
How to convert a Rasterio merge command into a GDAL merge command
My understanding is that Rasterio is mostly a python wrapper for GDAL functions to make them easier to use. That certainly seems the case for me because I'm having a lot of trouble duplicating with ...
0
votes
2
answers
144
views
Unable to set zoom level when convert tif to mbtiles using gdal_translate in QGIS
Continue from this link, for my situation, the only way to generate .tif to .mbtiles is
gdal_translate in QGIS.
This is the .json after using gdal_translate
Setting: GDAL > Raster conversion > ...
1
vote
1
answer
151
views
Convert image from EPSG:4326 to EPSG:3857
I'm new to GDAL and map projections, I need to convert equirectangular (EPSG:4326?) projection to "pseudo Mercator" (EPSG:3857?) projection used by 90% web-based maps (which is simple this 0/...
2
votes
2
answers
92
views
Failed to process SRS definition gdal translate png to tif
I want to use the same command from terminal to a python script:
gdal_translate -co compress=lzw -of Gtiff -a_srs EPSG:32634 img.png img.tif
In order for this command to work, you must have at the ...
0
votes
1
answer
230
views
Set the CRS in the output file using gdal translate
I am trying to stack the single band image into a composite band. I am able to do the stack the bands but the crs is not set.Also when i use the outputSRS in my code the code runs but the image is not ...
0
votes
1
answer
102
views
gdal translate makes output image much larger than input one
I have an input image with a size of ~18MB, which is mostly black and only 25-30% contains data. After I run gdal translate command like this:
gdal_translate -ot Byte -scale_1 0 200 -scale_2 0 184 -...
1
vote
1
answer
67
views
Trying interpolation with my GeoTIFF file using gdal but not working [closed]
I was trying interpolation using gdal_translate but the results are always the same for all interpolations be it nearestneighbour, bilinear, cubic, etc. No change in file size and no change in output ...
2
votes
1
answer
175
views
How to export data from a WMS to TIFF using command line tools?
I am able to export data from a WMS service using QGIS. I would like to be able to do the same using GDAL command line tools.
Below is a reproducible setup of my current method, which I hope to ...
1
vote
0
answers
79
views
Convert dataframe showing points inside a polygon to GeoTIFF raster using Python
I have a point shapefile with 0.01 degrees spacing. The points are confined within an irregular shapefile boundary for example Alaska state boundary. I have used the point shapefile and retrieved some ...
0
votes
0
answers
57
views
GDAL command alternative in dzsave
I am new to dzsave (libvips) library. Before I stumbled upon this I was using GDAL to tile images. I decided to look into dzsave because GDAL was taking 40 seconds even after using the --process flag ...
1
vote
1
answer
44
views
How to define origin and extent for Raster Images and getting it work properly in gdal2tiles
I'm trying to generate Raster Tiles for my Nasa's Black Marble which has the dimension of 86,400 x 43,200 that I combined out of all the 8 images.
I've been known about gdal2tiles. So basically, I ...
0
votes
0
answers
167
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
48
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
2
answers
146
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 ...
1
vote
1
answer
83
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
117
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
289
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 ...
4
votes
1
answer
221
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/...
1
vote
2
answers
110
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
40
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
60
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
165
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. ...
1
vote
1
answer
22
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
25
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
301
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; ...
0
votes
0
answers
31
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
85
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
74
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=...
0
votes
0
answers
154
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....
1
vote
1
answer
337
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=...
2
votes
1
answer
372
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, ...
1
vote
1
answer
209
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 ...
0
votes
1
answer
102
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....
0
votes
0
answers
59
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 ...
0
votes
0
answers
108
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 ...