Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gdal-translate]

Command line utility to convert raster data between different formats.

0
votes
0answers
9 views

How to set correct geo information on pleiades images with RPC model?

Now I have pleiades raster (img.tif) and a RPC model (rpc.XML). In the rpc.XML, there are the following lines which can be used to reset geo information. <RFM_Validity> <...
0
votes
1answer
38 views

GDAL EPSG:4326 Python

I am converting multiple CSV (Lon, Lat, value) to GeoTIFF. My output is in a different projection (EPSG:404000) using output = 'gdal_grid -a invdist:power=2.0 -zfield "value" -of GTiff -ot Float64 -...
0
votes
1answer
31 views

Gdal_Translate -Projwin giving Error (Error while crease Subset from Image)

"C:\Program Files\QGIS Las\OSGeo4W.bat" gdal_translate -of EHDR -projwin 39 10865.0 330905.0 3894865.0 335885.0 E:\F\CLP_BLD.img C:\Users\kailash\Desktop\gg g\...
3
votes
2answers
102 views

ERROR 1: Error : band 1 has no color table

I would like to convert a GeoTIFF to PNG or JPEG RGB, and my GeoTIFF is stripped of a lot of valuable data (I think..) I am on ubuntu and I am using gdal_translate to try and make a GeoTIFF turn into ...
0
votes
1answer
33 views

How to make gdal_translate support MrSID driver

I am using gdal_translate -b ... in.sid out.sid to remove excess bands (there are 5 bands) from .sid files as a layer created from these .sid's will be a JPEG layer. When executing command on a .sid ...
-1
votes
0answers
18 views

Create a multiband GeoTIFF from mutli-subdataset NetCDF file

I am trying to convert a NetCDF file containing water velocity over time to a GeoTIFF for a single time using gdal. The x and y is split into 2 different subsets in the NetCDF file with each subset ...
1
vote
1answer
22 views

Translating raster from GTiff to ASC format using GDAL Python package?

I tried using GDAL Translate as follows and encountered an error. OutTileName_tif = CH_14.tif OutTileName_asc = CH_14.asc gdal.Translate(OutTileName_tif, OutTileName_asc) Error message is ...
1
vote
0answers
36 views

GeoTIFF to KMZ using gdal_translate produce imagery with bad colors

I have a TIFF file which is georeferenced in UTM coordinates. So as a first step, I convert the UTM TIFF into a WGS84 TIFF using gdalwarp. On the next step, I used gdal_translate to convert a TIFF ...
1
vote
0answers
32 views

Details on 'pixel' and 'line' variables for gdal_translate gcp inputs

I am attempting to use gdal_translate and gdal_warp to georeference an image similar to the plugin for QGIS "Georeferencer". When I use QGIS, georeferencer produces this GDAL script: gdal_translate -...
1
vote
0answers
57 views

gdal_translate Resample different min max values

I tried to resample a Sentinel2 GeoTiff with a 20m resolution to 10m resolution using gdal_translate: result = gdal.Translate(outFile,resampleBandPath,format="GTiff",width=10980,height=10980,...
3
votes
2answers
41 views

GDAL_Translate output .TIF is VERY small compared to map (in QGIS)

using QGIS 3.2 ... Here are the steps that I followed: 1) Used NCRA (NCO) to generate average dewpoint temperatures for given months in given years (calculating the meteorological seasonal average) 2)...
-1
votes
0answers
20 views

GDAL API - Reproject GRIB2 file without writing intermediate file to disk

I'm trying to reproject grib2 file and as seen in this post it is possible with gdalwarp/gdal_translate command-line tools. I was hoping that with GDAL API I would be able to skip step of writing ...
4
votes
1answer
153 views

GeoTIFF (ESA Copernicus data) georeferencing coordinates are mirrored and projection slightly off when checking on Google Maps

I worked on downloading a Sentinel 5P data in my question at Converting a netCDF4 file to (georeferenced) GeoTIFF, problems with georeferencing and also transforming the netCDF4 (.nc) file into a ...
1
vote
1answer
76 views

Converting a netCDF4 file to (georeferenced) GeoTIFF, problems with georeferencing

Let's assume a netCDF4 (.nc) file downloaded from https://s5phub.copernicus.eu/dhus/odata/v1/Products('e6e91b26-ca43-43d4-9c08-c9c14dd6737e')/$value . This is sulphur dioxide measurement dataset over ...
1
vote
1answer
79 views

Converting GeoTIFF to USGS DEM or DTED using GDAL

I have been looking the documentation for gdal_translate and it doesn't list the -of format available options there. So I tried looking at the source and basically ended up read the SetFromUserInput ...
0
votes
1answer
32 views

Gdal_translate with WMS troubles

The data I'm interested in is found here and can be opened directly in your browser: http://maps.greenmin.gl/geusmap/ows/32624.jsp?nocache=nocache&whoami=[email]&LAYERS=...
1
vote
0answers
25 views

Issue running GDAL_Translate on Redhat PPC64

I try to run the gdal_translate command to extract and convert the MODIS hdf file into its respective band raster tif on a Redhat PPC64 environment and I encountered following error: with my command: ...
1
vote
1answer
52 views

osgeo.gdal.Translate - How to set compression on GDAL GTiff driver

How do I force the use of compression on the GTiff driver when called from osgeo.gdal in Python? Example on the workflow, which currently reads LZW tiffs and dumps them to uncompressed tiffs. from ...
2
votes
1answer
82 views

KMZ into geotiff / gdal_translate

I have a kmz file which I would like to convert to geotiff. Unfortunately, gdal cannot handle kmz files from the rack. Obviously, there seems to be a driver available on: https://www.gdal.org/...
2
votes
0answers
60 views

Using max as resampling method with gdal_translate?

My Issue According to the docs it appears that gdalwarp has many more resampling methods than gdal_translate. Can anybody explain why the resampling methods can't be used with both functions? ...
0
votes
0answers
40 views

Batch processing TIFFs using gdal_translate to get a single vrt file

I am new to GDAL and trying to create a vrt of all TIFFs (listed in an input text file) Is there a way of doing this with gdal_translate? I have tried using the command below called within Python. ...
1
vote
0answers
53 views

gdal_translate with -projwin errors out

I'm trying to use gdal_translate to crop a section of the raster into a new file. I was given direction to use -projwin for two reasons. 1) -srswin required a pixel location but the process would not ...
0
votes
0answers
42 views

RGDAL: gdal_translate -tr parameter for projected output raster file

I use gdal_translate to extract data from a GeoServer ImageMosaic in WGS84. During the extraction, I would like to reproject the resulting raster into a Mollweide projection at 30m resolution. For ...
0
votes
1answer
83 views

gdalinfo and other applications not running through Anaconda Prompt

I am using GDAL 2.0.3(installed through wheel) in Anaconda 4.2.0 with Python 3.5 installed. I am able to import GDAL in my code. But whenever I am trying to run gdalinfo and other applications(such ...
1
vote
1answer
119 views

Efficient downsampling with GDAL?

I have a 350go GeoTIFF file with DEM data for the entire world. (a mix of SRTM, EUDEM, etc. ...) This TIFF file is tiled with a block size of 256*256. I would like to downsample this file to a lower ...
1
vote
0answers
71 views

reprojection and write grib files

I'm working on GRIB file, In input, I have the file with data from 0 to 360°. As gdalwarp does not write GRIB file (only gdal_translate), I use gdal warp to projct data from [0,360] & [-90;90] to ...
0
votes
0answers
79 views

GDAL interpolation ignores edges with nodata vals

I have a grib file with weather data in 0.25-degree resolution and I want to upsample its higher resolution. I used gdalwarp: gdalwarp -t_srs EPSG:3857 -of GTiff -wo SOURCE_EXTRA=1000 -wm 2000 --...
1
vote
0answers
116 views

Min-max stretch using gdal_translate in a batch

I'm trying to do a min-max stretch on a raster and save it using gdal_translate. The syntax requires to enter source min and max raster values as arguments for a -scale option: -scale [src_min ...
0
votes
0answers
34 views

Inconsistent origin when using GDAL translate to generate worldfile

Did anyone here face the issue of inconsistent worldfile generated from gdal_translate? Currently I am converting a geotiff file to jpeg, in the process also generate a prj and jgw file (jgw file is ...
0
votes
0answers
15 views

How to export images to JPEG images in Matlab/Ubuntu

I have processed my Landsat 8 data for previewing Band754, now I would like to export composite Band 754 image into JPEG images .I have used following codes in Matlab: system ([gdal_translate -ot ...
1
vote
1answer
63 views

gdal_translate and gdalwarp do not close when converting an ecw file to GeoTIFF

I'm trying to convert a portion of a fairly large ECW file to a GeoTIFF using either gdal_translate or gdalwarp. The problem I'm having is that the GeoTIFF is generated but gdal_translate and ...
0
votes
1answer
147 views

gdal_translate with custom corner coordinates in python

I wish to convert this Python code using a gdal command line tool to using the gdal python library. I am using it to convert some PNG satellite images I am downloading to georeferenced TIFFs. I ...
1
vote
0answers
32 views

How to preserve NoData areas when changing data type in GeoTiff with QGIS or gdal_translate?

I have a float geotiff raster with values 0, 1 and 2, along with a nodata area. I'm trying to convert the file type do Byte but I'm not being able to preserve the nodata area. It gets converted to 0 ...
2
votes
1answer
24 views

modal resampling in GDAL: what happens when two classes are equally represented

gdal_translate has a parameter to resample the values based on the most frequent class in the output pixel (-r mode). However, this most frequent class does not necessary exist (when two or more of ...
0
votes
0answers
86 views

Convert bsq files to tiff files in python

I am trying to convert multiple bsq files to tiff but I am getting a black outup. I think that it is something related to the scale but I have tried a couple of things that do not work. What should be ...
0
votes
0answers
40 views

Can GDAL give the scale of a raster?

I have a GeoTIFF and I am trying to overlay a scale (miles or km) using GDAL. Is there a function in GDAL that will do this? I believe ArcPy has this functionality, but I am guessing GDAL does ...
0
votes
1answer
42 views

GDAL: Keep or reset CRS information in raster tiled GeoPackage

I have two contiguous raster files that I would like to include in a single GeoPackage file. The two rasters report to the same CRS: $ gdalinfo T001.tif Driver: GTiff/GeoTIFF Files: T001.tif Size is ...
-3
votes
1answer
74 views

Source Code for gdal_translate

Where can I get the source code for gdal_translate? I need to modify it for my own use.
1
vote
0answers
25 views

Can I change the pixel sizes in a world file?

I start with a dataset that has projection WGS84 and pixel size 0.000274658203125 degrees/pixel. I run gdal_translate to convert it to a PNG: gdal_translate dataset.tif output.png -of PNG -ot byte -...
0
votes
1answer
49 views

GDAL-Georefrencing already Georefrenced single band Raster

I am trying to georeference already georeferenced single band raster data using GDAL with four GCP's. Input image is having Coordinate system GCS- WGS1984 (EPSG:4326). Following Command is run on ...
0
votes
0answers
24 views

Geo-tagging each pixel within an image using GDAL or Python and creating a jpg

I have a large multi band image, in ENVI format that was taken using an aerial platform. Three files are generated out of that, ENVI file, hdr file and a nav file. The system provides lat/long co-...
0
votes
1answer
160 views

Gdal Translate Creating Non-Standard File from netCDF

I am trying to convert netCDF file from NASA Ocean Color website such as https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2018001180000.L2_LAC_OC.nc now the file converts fine using the answer to ...
0
votes
1answer
159 views

convert png with alpha channel to GeoTiff

How do I convert a png with an alpha channel to a GeoTIFF using gdal_translate so that the alpha channel gets reflected in the GeoTiff. Currently the GTiff that is produced is resulting in 3 Bands, ...
0
votes
1answer
325 views

Converting Sentinel 2 jp2 bands to TIFF with gdal

I want to convert a .jp2 file from the Sentinel 2 project to .tif with gdal. For some bands it works (e.g. B01) and for some bands it always fails (e.g. B04). I use the sentinel public image browser ...
2
votes
0answers
143 views

convert tiff to UInt16 PNG turns black

Im using to gdal_translate to create tiled DEM, tif(float32) -> PNG (UInt16). All the images trun out black. When I change UInt to byte - everything work as expected. What am I doing wrong? import ...
2
votes
1answer
109 views

Transforming Lambert Conformal Conic to EPSG:3857

I have a map file in a tiff format that is not geo-referenced, but I know the following projection information: +proj=lcc +lon_0=10.856 +lat_0=51.322 +lat_1=42 +lat_2=57 +datum=WGS84. I would like to ...
1
vote
0answers
64 views

Raster Conversion set output path [GDAL] [closed]

I planned to use gdal_translate to convert raster from uncompressed RGB geotiff to compressed(JPEG compression) YCBCR geotiff as a batch process. So I have created a .bat file using this code for %%i ...
1
vote
0answers
126 views

gdal_translate fails to add raster to existing vector geopackage

I have an existing GeoPackage soils.gpkg with a single vector feature set. I am attempting to use Gdal to add a tiff raster to the GeoPackage; however, it fails in the following way: C:\Users\Me\...
0
votes
1answer
75 views

Increase contrast of merged Planet Labs scenes

I've download a few PlanetScope scenes from Celaya, MX. Taken alone they have a good contrast. Then I've merged them with gdalbuildvrt, which lowered the contrast: Link I've thought, that I could ...
2
votes
1answer
436 views

Performing gdal translate to png/jpeg?

I tried gdal translate to png: gdal_translate image.bsq image.jpg -of JPEG -outsize 10% 10% -scale and jpeg: gdal_translate image.bsq image.png -of PNG -outsize 10% 10% -scale jpeg looks better ...