Questions tagged [gdal-translate]

Command line utility to convert raster data between different formats.

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

File size inflation using GDAL

New to GDAL, have some tiff files and I'm trying to do the following: "0 to NoData" to avoid black background in Mapbox: gdalwarp -dstnodata 0 -dstalpha [input file] [output file] The problem is, ...
0
votes
0answers
36 views

Constructing boundary polygon around raster image when mask layer is ill-defined using GDAL with Python?

I have a raster image and I want to construct a new vector layer that has the boundary of the raster, using python. Below is a sample of the image. The problem is that the nodata value is set to "...
0
votes
1answer
38 views

GDAL Translation gives incorrect GeoTIFF Projection

I am very new to GIS. I am trying to translate a single band of a NetCDF file to a GeoTIFF file, and then load it up into QGIS and have it overlap with a shapefile of the US. However, when I load up ...
2
votes
0answers
36 views

Change corner coordinates GEOTIFF

I have a geotiff and I have the corner coordinates set using gdal_translate and the a_ullr argument setting out the min/max long/lat. This provides a bounding box for the geotiff to be projected. But ...
1
vote
1answer
37 views

Values change after re-projecting the NetCDF files to TIFF file

I am trying to re-project a NetCDF file to a uniform grid EPSG: 4326 and convert it to a TIFF file. However, after the GDAL re-projection the values in the file change, i.e. the values are not ...
0
votes
0answers
57 views

How to convert Lat, Lon, Alt to ECEF and EPSG 4979?

I am programmatically generating data to use in Cesium's 3D Tile System. The data I have is in (Latitude, Longitude, Altitude) format. To display the data in Cesium, I have to first define a region to ...
1
vote
0answers
13 views

How to specify HGT file name in gdal_translate command?

gdal_translate command is generating a HGT file with user defined name but its giving an error as `N5464347W74.hgt' not recognized as a supported file format. Below is the command and the entire ...
1
vote
1answer
47 views

How to convert a TIFF file to HGT file?

In my project I needed to convert TIFF file to SRTM data and came up with following warning/error. gdal_translate -of SRTMHGT Terrain.tif Terrain.hgt Output: Warning 1: The source projection ...
2
votes
1answer
58 views

Averaging overlapping rasters with gdal

I am working on creating a class which will merge several georeferenced rasters into one using different strategies, essentially taking average, max, min where the images are overlapping. So far I've ...
1
vote
1answer
40 views

Clipping tiff image with a bounding box with GDAL in Java

Since GDAL 2.1 GDAL and OGR utilities can be used as library functions, so this task is incredibly simple now: from osgeo import gdal ds = gdal.Open('original.tif') ds = gdal.Translate('new.tif', ds,...
0
votes
0answers
37 views

gdal_translate not recognizing file format [duplicate]

I am trying to convert a .dat file to a .tif file using gdal_translate. The .dat file comes with an associated .Hdr file of the same name with the metadata (these are geospatial data from SNODAS). ...
0
votes
1answer
113 views

“Error 4: xxxxx.dat: not recognized as a supported file format.”

I am trying to convert a .dat file to a .tif file using gdal_translate. The .dat file comes with an associated .Hdr file of the same name with the metadata (these are geospatial data from SNODAS). ...
0
votes
0answers
20 views

Merging two GRIB-2 files to 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
20 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
81 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
24 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
53 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
63 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
54 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
38 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
16 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
45 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
34 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
57 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
52 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
26 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
14 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
252 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
99 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
32 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
76 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
21 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
56 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
79 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
103 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
144 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
408 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
40 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
53 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
122 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 ...
-1
votes
2answers
153 views

GDAL 2.4 but the current library version is 2.2 [on hold]

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
26 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
149 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
92 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
22 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
99 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
59 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
65 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
69 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> <...