Stack Exchange Network

Stack Exchange network consists of 175 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
11 views

Specifying dimension for variable in NetCDF input file using GDAL?

I have a data which is in .nc format. I want to extract a variable which is in XxYxZ dimensions for example 4032x496x3 inside the netcdf file. But the problem is when using gdal_translate it is ...
0
votes
0answers
11 views

How can I convert MISR(multi-angle image spectro-radiometer) level 2 AOD (MIL2ASAE) swath dataset to grid data

I am able to convert as batch the 'Aerosol_Optical_Depth' data set inside MISR(multi-angle image spectro-radiometer) level 2 (MIL2ASAE) swath data to grid data,which is in .nc format, and in 2 ...
1
vote
1answer
29 views

Can Gdal.Translate() return an object instead of writing a file?

I have some Python GDAL code I am using to convert a GeoTIFF file to PNG. The code uses the gdal.Translate() function which generates a new file each time I run it. However, I was wondering if there ...
0
votes
0answers
17 views

GDALWarp and Target Aligned Pixels Not Effective

I have two sets of TIFFs of different resolutions (100m and 1000m), different alignment, and varying data types with corresponding no data values. I need to downsample the 100m TIFFs to match the ...
0
votes
0answers
15 views

How to compress DSM with GDAL?

I have a DSM model and I need to compress it to be able to load it in the web browser. I tried many commands with GDAL but none of them is working correctly. For example, I tried this command: ...
1
vote
0answers
30 views

How to convert 4 band GeoTIFF to PNG or JPEG using gdal_translate [duplicate]

I have an orthomosaic GeoTIFF and it has 4 bands. I want to convert it to a PNG/JPEG image to show it on Cesium. I've tried gdal_translate like this : gdal_translate -a_nodata 0 -of PNG 1.tif 1.png -...
0
votes
0answers
11 views

Adding points to a gridded XYZ

I have a gridded xyz file that I got from gdal_translate on a tiff file, it's 65,536 points from a 256 x 256 .tif file. I have interpolated another x column of points to make it a 257 x 256 .tif ...
1
vote
1answer
21 views

gdal_translate for rotated image [closed]

Even after rotating a GeoTIFF file, the resulting file size do not change. however, the rotated file overlays on the original TIFF file. When I tried gdal_translate with projwin switch an error ...
1
vote
1answer
69 views

Applying function to all files in directory using PyQGIS?

I have a problem for apply this function in all files. This script is about the extraction of the bands from a raster and I want to use it on all the file raster in the folder. It works on the single ...
1
vote
0answers
25 views

Gdal raster translate and wrap

I am trying wrap my raster with GCP control points using gdal_translate and gdalwrap tools. I've read at gdal mailing list about wrap with affine transformation, so I thought it is easy to done using ...
0
votes
0answers
60 views

gdal_translate errors with VRT: GetBlockRef failed and IReadBlock failed

I am projecting global rasters with the Homolosine. gdalwarp reprojects it nicely, but it does not compress the output, that must be done afterwards with gdal_translate. To reduce computation time, I ...
0
votes
1answer
45 views

gdal_translate JPEG to GeoTIFF using Python

I was able to convert my GeoTIFF images (from the SpaceNet dataset) to JPEGs using gdal_translate but I would like to know how to convert the JPEGs back to GeoTIFF. I've noticed that gdal_translate ...
1
vote
1answer
24 views

ETOPO1 upsampling issue

I am using the OSGeo4W Shell with the ETOPO1, 1 arc-minute global bathymetric data (etopo1_ice_g_f4.flt). I am cutting 256x256 pixel slippy map tiles, and am having a problem with getting smooth-...
1
vote
0answers
36 views

Project a subset of GeoTIFF image from UTM 32651 to EPSG:4326 by bounding box in EPSG:4326?

I have a GeoTIFF file which is in UTM 32651 and I need to develop a program, using GDAL library version 1.x (e.g., not using gdalwarp/gdal_translate binary tools) which takes a subset bounding box in ...
1
vote
1answer
41 views

gdal_translate Bilinear Interpolation

I am working with the v2.3.3 NuGet of GDAL by Tamas Szekeres for the .NET environment, and can successfully open the etopo1_ice_g_f4.flt raster to cut basic tiles. The problem I am having is that ...
0
votes
1answer
46 views

GDAL 2.4 but the current library version is 2.2

After upgrading to gdal 2.4 on Debian testing (buster), I get $ gdal_translate ERROR 1: gdal_translate was compiled against GDAL 2.4, but the current library version is 2.2 I've checked with ...
1
vote
0answers
21 views

Trouble matching SRTM data clip to slippy tile extents

I'm trying to extract the SRTM data for some slippy tile in QGIS, and it doesn't seem clipping to the right extents. Here are some of the data for the tiles that I'm using to test (this data comes ...
0
votes
0answers
17 views

Problem with gdal_translate when converting a GeoTiff with spherical datum to a netCDF

I have a raster file with LCC projection and spherical datum. It actually has the following proj4 parameters: +proj=lcc +lat_1=45 +lat_2=22 +lat_0=38.7 +lon_0=20 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +...
1
vote
0answers
57 views

Converting JPEG2000/MrSid files to GeoTIFF using GDAL [closed]

This question is related to one previously asked: Batch convert jpeg2000 to GeoTIFF? We certainly need to batch convert some JPEG2000 files to GeoTIFF; the problem is, it doesn't seem to work. We don'...
0
votes
0answers
28 views

gdal2tiles (or some steps before) produces erroneous tiles from a mosaic TIFF

I have for some days now tried to create a image pyramid from a set of around 1400 TIFF files with no luck. I can't get my head around what is the cause of the problem. I will try to explain as good ...
1
vote
0answers
14 views

Produce a filtered version of a GRIB file

How can you produce a filtered GRIB file containing a subset of information from an original "bigger" GRIB file? Let's say I have a GRIB file covering pressure, temperature and wind direction for a ...
2
votes
1answer
35 views

Deleting GCP set in GEOTIFF?

How to delete GCP set in GEOTIFF? I have some GEOTIFF files. They have been set for GCP, but I made a mistake. Therefore, I want to take the following procedure. Delete the set GCP. Grant new GCP. ...
2
votes
0answers
28 views

gdal_translate does not crop the GeoTIFF file [closed]

When I use gdal_translate to crop the GeoTiff file, the output file is saving the same as the input file. Nothing changed. The size needs to decrease at the boundaries I specify. What can I do? from ...
3
votes
0answers
43 views

2018 USGS Geospatial PDF produces `ERROR 1: insufficient arguments for Marked Content`

Issue When processing the 2018 Geospatial PDFs from the nationalMap.gov an error occurs that was not seen when processing the same quadrangle from 2015. I should note: there is no problem with ...
2
votes
1answer
60 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
66 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
35 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
3answers
228 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
66 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 ...
2
votes
1answer
67 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
48 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
48 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
86 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
55 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)...
4
votes
1answer
179 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
98 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
197 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
46 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
29 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
2answers
236 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
195 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
103 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
63 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. ...
0
votes
0answers
89 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
1answer
145 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
171 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
116 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 ...
1
vote
0answers
196 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
39 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
20 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 ...