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.

1
vote
0answers
12 views

Merge GRIB-2 files to a single GrIB-2

I have two neighboring GRIB-2 files. they cover several meteorological information layers like wind direction, wind speed, gusts speed, precipitation, etc. for a 3 days period. their internal ...
1
vote
1answer
13 views

Trying to make calculation with gdal_calc.py?

I have a tif image that I'm trying to run gdal_calc.py. In the source file the values are between 1,118-9,704 and I want to divide all the values by 10,000 to get results between 0-1. This is the ...
1
vote
1answer
64 views

Masking areas outside of polygon using GDAL?

I am trying to "mask" raster cells that are outside of a polygon layer, setting them to "NoData". Also, I need to use GDAL, rather than R which I normally use, because the raster is too large to fit ...
0
votes
0answers
16 views

Getting error converting .tif to .map format?

I am getting this error when I try to convert .tif to .map format: ERROR 6: PCRaster driver: Cannot convert cells: Usetype is not version 2 cell representation, VS_LDD or VS_BOOLEAN Input file ...
1
vote
1answer
25 views

Transforming NetCDF file in longlat projection into TIF in EASE 2.0 using gdal_translate and gdalwarp

I am very new in this. My goal is to convert 1 subband from .nc files (which I have several thousand if it matters) stored in longlat projection into .tif files in EASE 2.0 projection. I do that in 2 ...
0
votes
1answer
28 views

Using gdal_translate for multiband raster to convert into .XYZ file? [duplicate]

I have raster containing 2 bands (NDVI and DEM). This raster was created in SNAP using "Add Elevation Band" option, "DEM Model:SRTM 1sec Grid" to the NDVI product I had generated earlier. I could not ...
0
votes
1answer
34 views

How do I crop a TIFF down to a specific region?

I have two TIFFs that have the same pixel size. One of them is geolocated inside the other. I would like to crop the larger one down to the exact same extent as the smaller one. Is this possible with ...
1
vote
0answers
22 views

How to change nodata with gdal_translate

I am trying to create a tiff file using gdal_translate. Initially my noDataValue was 0.0, but my client suggested that - noDataValue should be -9999.0, so I changed it to -9999.0. gdal_translate -of ...
0
votes
0answers
11 views

gdal_translate segmentation fault with mbtiles output

I'm running gdal 2.4.1 and I'm trying to convert a jp2 file to an mbtiles file. but works fine converting to a geotiff, but not to mbtiles. I do have mbtiles as a supported format listed in ...
0
votes
1answer
37 views

Convert a .png file to a GeoTIFF while knowing the boundings

Disclaimer: I've already found this link Convert PNG to GeoTiff using GDAL - but it was of no help. Actually I've got a .png file of a hand-drawn map (I also got it in the .svg format in case this ...
1
vote
1answer
27 views

PNG driver chokes on raster gdal_transformed to ot byte

I'd like to extract a part of a DEM (data.linz.govt.nz wellinton lidar dem) and analyse it using gdaldem: $ gdalinfo /vagrant/public/assets/GeoTIFFs/17a17d1fae/lenz-mean-annual-temperature.2193.tif ...
0
votes
1answer
48 views

Convert Sentinel GeoTIFF file to JPEG image

I am facing difficulty converting between Sentinel GeoTIFF file and JPEG file. I used below command i.e. gdal_translate -b 4 -b 3 -b 2 -of JPEG -scale inputimage.tif outputfile.jpeg The problem with ...
1
vote
1answer
44 views

How do I transform an EPSG:3857 world map to an EPSG:4326 ECE world map?

This follows up a question posted over seven years ago. The results look very similar to the original inquiry without an answer or update I could test successfully. I made a custom stylized EPSG:3857 ...
0
votes
0answers
25 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
13 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
119 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
48 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
27 views

Compressing 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
48 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
18 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
42 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
75 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
51 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
88 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
174 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
34 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
46 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
68 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
92 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
22 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
95 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
58 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
18 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
65 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
47 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
52 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
64 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
113 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
55 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
329 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
128 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
93 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
75 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
63 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
108 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
68 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
216 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
120 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
368 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 ...