Questions tagged [gdal-translate]

Command line utility to convert raster data between different formats.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

How to prevent gdal_translate from overwriting existing file?

I am using gdal_translate to compress a Geotiff file because i found out that gdalwarp has known issues handling compression. But, I can see that gdal_translate does not give an error message if the ...
Cicatrixx's user avatar
  • 131
1 vote
0 answers
21 views

Clipping WMS with gdal_translate [closed]

I want to clip this WMS https://www.ign.es/wms-inspire/pnoa-ma?SERVICE=WMS& to a specific extent. I have tried what was suggested in these two posts, but they did not work: Trying to use ...
Isa's user avatar
  • 175
0 votes
0 answers
22 views

Translating (cropping) a GeoTIFF file to a specific extent but ending up with a different final extent

I'm trying to crop a larger GeoTIFF file to a smaller extent. The darker GeoTIFF file in the middle has the extent I want to reproject to. I've used the following command to do the translation: ...
Jamess11's user avatar
0 votes
1 answer
25 views

Use GDAL TOOLS to change a JPEG plate-carree to a proper GeoTIFF using gdal_translate

I am trying to use GDAL TOOLS to change a JPEG plate-carree to a proper GeoTIFF using gdal_translate. My input JPEG image is a full map of the Earth in plate-carree projection. I want to output this ...
Molly's user avatar
  • 35
1 vote
2 answers
57 views

Use gdal_translate on an orthographic PNG image of the Earth centered at Lat=+50N Lon=+5E to proper orthographic GeoTIFF format

How do I gdal_translate an orthographic PNG image of the Earth centered at Lat=+50N Lon=+5E to proper GeoTIFFf format ? I cannot work out how to specify the limits of a full disc. (diameter of Earth ...
Molly's user avatar
  • 35
1 vote
0 answers
65 views

What is the proper syntax in gdal_translate to change image.png to a geotiff by assigning latlong pairs to pixels?

I cannot find comprehesible documentation on how to assign latlon to pixels in an orthogonal image that must be made into a proper geotiff. INPUT kat.png (ORDINARY) OUTPUT kat.tif (GEOTIFF) 512px by ...
Molly's user avatar
  • 35
0 votes
1 answer
55 views

DJI photo has EXIF data with GPS location but QGIS Raster>Convert>Translate shows it in the middle of the sea

I have taken a couple of test photos with a DJI Spark and they contain EXIF GPS data: File Name: photo.jpg ... {snip} File Size: 7.6 MB ... {snip} Image Description: DCIM/100MEDIA/DJI_0014.JPG Camera ...
user878557's user avatar
0 votes
1 answer
52 views

GDAL: GFS weather model reprojection issues

I'm trying to reproject a grib file using gdal. The crib file has the following,relevant, info: GEOGCRS["Coordinate System imported from GRIB file", DATUM["unnamed", ...
Davide Raro's user avatar
0 votes
0 answers
43 views

Error trying to translate raster image from EPSG:3857 to EPSG:3068 with GDAL with subwindow

I'm new with this GIS stuff and starting work with GDAL. I'm using this TMS dataset and trying to project to a specific subwindow like this: <GDAL_WMS> <Service name="TMS"> ...
fmenegussi's user avatar
0 votes
0 answers
85 views

Some problems with gdal_translate to translate from GeoTIFF to 32 bit grayscale TIFF, exr or similar [duplicate]

I need 32 bit grayscale DEM map from GeoTIFF to crop it in Photoshop and use in 3D applications as height displacement map. I use Windows and have images copied in OSGeo4W Bin folder so there is no ...
Alex J.'s user avatar
  • 119
4 votes
2 answers
95 views

Exporting GeoPDF to GeoTIFF alters resulting TIFF in Pro and GDAL

I have a number of 24k USGS topo maps downloaded from the National Map. I want to convert these GeoPDFs to GeoTIFFs and clip them to remove the collars. When I execute the conversions using the ...
GBG's user avatar
  • 9,614
0 votes
0 answers
24 views

Using gdal_translate to convert 32-bit raster to byte is black

I have a 32-bit float raster in GRASS. It is a single channel Sentinel 2 raster. I can export to geotiff with r.out.gdal: g.region rast=orthoimage_red r.out.gdal input=orthoimage_red output=...
Jeshua Lacock's user avatar
0 votes
0 answers
20 views

gdal_translate translation from jp2 to geotiff scales the values for no reason

I have download a sentinel-2 image and I am using gdal_translate to convert it from jp2 to geotiff using this python command: kwargs_gdal = {'format': 'GTiff', 'xRes': xRes, ...
Karantai's user avatar
0 votes
1 answer
58 views

Gdal Translate with scaling option in C#

I am trying to scale an image with Gdal using Gdal.wrapper_GDALTranslate. However, I have the options input for the scaling incorrectly formatted. The error I receive is "Too many command options ...
gktval's user avatar
  • 1
1 vote
1 answer
158 views

Add zoom levels to the build of a mbtile from a TIFF file

I have build a raster file (.tif) using GDAL, but I want to set different zoom levels for it but when running: gdal_translate -of MBTiles -co "ZOOM_LEVEL_STRATEGY=AUTO" -co "TILE_FORMAT=...
user7993425's user avatar
0 votes
0 answers
35 views

Warp result of GDAL translate jpg to geotiff using osgeo.gdal

I am attempting to warp a geotiff created from gdal.Translate where the original file was a jpg. I first obtain the ground control points from a co-located text file. The results of gdal.Translate ...
jclark754's user avatar
  • 111
1 vote
1 answer
194 views

Convert KML to GeoTIFF with Python (osgeo.gdal)

I have a KML file provided by a user that looks like: <?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://...
jclark754's user avatar
  • 111
0 votes
0 answers
131 views

Convert GeoTIFF DEM to DTED level 2 (.dt2) without modifying bounds

I tried converting GeoTIFF DEM to DTED using GDAL with following command gdal_translate -of DTED -outsize 1201 1201 -projwin_srs EPSG:4326 -co LEVEL=2 somefile.tif somefile.dt2 It gives a warning &...
Vignesh M's user avatar
0 votes
0 answers
17 views

Trying to extract a PNG from a WMS service using gdal_translate

I'm trying to run the following command gdal_translate -of PNG -projwin_srs "-200357 200375 200375 -200305" -outsize 512 512 frmt_wms_openstreetmap_tms.xml openstreetmap.png The ...
Tommie Jones's user avatar
0 votes
0 answers
52 views

GDAL warp removing half of the map

I am using gdal warp to transform a geotiff between espg:4326 to epsg:3857, I have successfully done this previously on similar images but with the current geotiff it doesn't seem to be working. I am ...
james hall's user avatar
0 votes
0 answers
35 views

Retiling a mosaic from new coordinates using GDAL

I am trying to retile a large mosaic tiff that I have created, but re-clip the large tiff using some slightly different coordinates that I have created that allow me to introduce a little bit of ...
KVSEA's user avatar
  • 1
0 votes
1 answer
43 views

Translated JPG image served via Mapserver WMS not displaying

I am experiencing a problem while serving an image via WMS (Mapserver). The image is translated (gdal_translate) with gcp and then warped (gdal_warp) to 4326. The issue is that the image is shown ...
Dimitrios Simos's user avatar
0 votes
1 answer
57 views

Converting VICAR data to TIFF

I want to convert the VICAR data found at this ASU link to TIFF that I can use in ArcGIS Pro. How am I able to do this?
minna's user avatar
  • 21
2 votes
1 answer
146 views

Translating raster from floating point to int16 increases size

I know that floating point takes 4 bytes and signed integer 16 takes 2 bytes. I have many DEM .tif rasters, they are all of type floating32. I want to convert them to type integer16 (regardless of ...
Khaled's user avatar
  • 255
3 votes
1 answer
54 views

gdal VRT pixel function keeps rounding output to int

I created a VRT with pixel function in Python that computes a logarithm of the pixel value. When I convert it to TIFF with gdal_translate the generated TIFF only has rounded values and drops the ...
ansonl's user avatar
  • 151
1 vote
0 answers
53 views

Raster calculator or translate with vrt output in PyQGIS

I have a 1 band, 8 Bit raster. I can map all pixel values apart from 0 to 1 with the raster calculator expression if ("rasterlayer@1"=0,0,1). However, it does not seem to work with vrt ...
MoritzMoreira's user avatar
0 votes
1 answer
41 views

How do I map points from a CSV file against bands in a raster?

I have a series of biome maps in QGIS 3.32 as multiband (RGB) raster layers. In a separate layer I have a series of points imported from a CSV file. How do I go about mapping the points (or rather a ...
Robert's user avatar
  • 3
1 vote
1 answer
61 views

How to translating OMI PROFOZ ozone layer HDF5 to GeoTIFF?

I studied the article 'Lower tropospheric ozone over India and its linkage to the South Asian monsoon' and the article 'Validation of 10-year SAO OMI ozone profile (PROFOZ) product using Aura MLS ...
ASHIS SARKAR's user avatar
0 votes
0 answers
355 views

ERROR 6: Unable to set GeoTransform, SAGA binary grids only support the same cellsize in x-y

I try to convert a TIF file to a SDAT file using the conversion tool in qgis. When I execute the gdal_translate command, I get the following message: "ERROR6:Unable to set GeoTransform, SAGA ...
tomasonvc's user avatar
0 votes
0 answers
61 views

Export each raster in a PostGIS raster table as a separate image using gdal_translate

I read from this SO question that one can export an entire PostGIS raster table into one image, as follows: gdal_translate PG:"host=localhost port=5432 dbname=landslide user=postgres password=...
tinlyx's user avatar
  • 11.1k
0 votes
1 answer
84 views

Convert Raster to shapefile with gdal translate

I use this code to get a polygon from a rasters (vrt) extend: # 1 processing.run('gdal:translate', {'INPUT': r"path/clip2x.vrt", 'OUTPUT': r"path/translate_mask.vrt&...
MoritzMoreira's user avatar
0 votes
0 answers
184 views

GDAL Python - Warping Raster with Inaccurate GPS data (GCPs)

I'm currently working to georeference a raster (GTiff, output by Metashape) using inaccurate GPS points (serving as GCPs). I have some code that works well, in that it places the raster the in the ...
JordanMakesMaps's user avatar
0 votes
0 answers
30 views

GDALTranslate output has not Coordinate Reference System when chunking raster C++

I am trying to take a chunk from a raster file using the GDAL library in C++. Here is the code I am using: const char * inputFile = "water_mask.img"; auto *dataset = (GDALDataset*) GDALOpen(...
justanotherguy's user avatar
0 votes
0 answers
35 views

gdal.Warp reading 2d multichannel array incorrectly - loading bands (3) as the y axis

We have a python script that downloads NOAA GOES satellite NetCDFs, and processes the image datasets via Pillow\OpenCV. Then I convert it back to a GDAL dataset in order to translate and warp. With a ...
John Lawler's user avatar
0 votes
0 answers
114 views

GDAL Translate not working in R because something is missing in QGIS folder

I get an error and I don't understand much. DO I have to install gdal in QGIS even if I'm using R? Is R using QGIS to run and translate jp2 sentinel files to tif? gdal_translate(ruta_bandas[2], "...
Johnny's user avatar
  • 1
1 vote
1 answer
52 views

Problems recovering 3d mesh from GeoTIFFs created from PDS IMG/LBL files using gdal_translate

Update: I've discovered that the problem lies in the pixel scale. For example, when I use `gdalinfo LDEM_512_90S_45S_000_090.tif` it shows the following for the pixel scale values: Pixel Size = (59....
Chris Gnam's user avatar
0 votes
2 answers
57 views

How can I simulate the Gdal translate scale function via code to manually change a 16 bit array

I know how to use the Gdal scale function but I would prefer not to use Gdal. I have a Uint16Array array representing pixels for png image used as a heightmap. Currently I use Gdal to scale the ...
dan's user avatar
  • 103
0 votes
1 answer
267 views

Set transparency for 3-channel GeoTIFF in GeoServer (with SLD, no alpha channel)

My GeoTIFF has 3 channels (RGB). I would like to generate a transparent output for pixels with R=0 AND G=0 AND B=0. Zero values should remain black in case there are values >0 in any other channel (...
luti's user avatar
  • 1
0 votes
0 answers
254 views

Generate MBTiles from WMTS with GDAL

I have a WMTS source and I would like to generate a MBTiles file from this url (I have access rights on this source). I would need to: Download the WMTS Clip it according to a vector layer (polygon) ...
fab's user avatar
  • 48
1 vote
2 answers
118 views

Output from gdal_translate projwin is different from geoserver WCS GetCoverage request?

I've a hard time understanding which one should be the correct result by gdal_translate or GeoServer. My system (Ubuntu 22.04) has: GDAL 3.4.1 Geoserver 2.22 running on Tomcat on port 9090 I have a ...
Bằng Rikimaru's user avatar
1 vote
1 answer
183 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 ...
Sébastien Bonaimé's user avatar
1 vote
1 answer
89 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 ...
Beardsley's user avatar
  • 433
2 votes
1 answer
176 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:...
neubert's user avatar
  • 360
1 vote
2 answers
43 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&...
CoderCoder42's user avatar
0 votes
0 answers
129 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/...
Nikolay Yasinskiy's user avatar
0 votes
1 answer
70 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</...
Nikolay Yasinskiy's user avatar
0 votes
1 answer
77 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&...
Nikolay Yasinskiy's user avatar
0 votes
1 answer
566 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 = ...
TheGame's user avatar
  • 47
2 votes
0 answers
214 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. ...
Josh's user avatar
  • 151
0 votes
0 answers
124 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 ...
cscrum's user avatar
  • 11

1
2 3 4 5
12