Questions tagged [gdal-translate]

Command line utility to convert raster data between different formats.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Shifting in pixel after subsetting with gdalwarp

I am trying to subset multiple image to smaller Area of interest I have tried with gdal_translate & gdalwarp in commandline but it causes slight shift in pixel in the output raster after cropping/...
1
vote
1answer
23 views

How to convert SPL2SMAP_S data (available in .h5 files) to *.tiff files?

I had downloaded some data from https://nsidc.org/data/SPL2SMAP_S The description of the data is given in the page. Using an earthdata login, one can download the data. The data consists of *.xml and *...
2
votes
0answers
35 views

Build Mosaic using gdal based on Modal value

I have an immense (~50,000) set of tiles that I want to mosaic using the mode for every pixel. The tiles have a size of 299x299 and are overlapping each other by 2/3 respectively. For the sake of ...
1
vote
1answer
61 views

Convert GDAL command line commands to Python script or code

I'm looking to convert my GDAL commands to Python code using either GDAL or Rasterio, as I've heard this is better to use. I've been scratching my head at this and I could be missing some simple ...
1
vote
0answers
20 views

View .hdr in GenBin Format

I'm using GDAL. I have created a .HDR and .BIL file from a .TIF but I want to have .HDR file in format as it displays in GenBin not like default or EHdr or ENVI format. My desired output: {{{ BANDS: ...
0
votes
1answer
20 views

Using gdal_translate to round pixel values in raster - I'm getting an error

I tried to follow along at question: Rounding raster pixel values to one decimal place in QGIS but my python script throws a syntax error at GTiff. I do have one that works for ArcGIS but my end ...
1
vote
0answers
26 views

gdal_translate GeoTIFF to NetCDF: values

I have a GeoTIFF file of sea ice concentration. When I use gdal_info it gives a series of values like: Metadata: COLORINTERP=Palette Color Table (RGB with 65536 entries) 0: 9,60,112,...
0
votes
0answers
16 views

Sentinel-2 change NBITS

I'm trying to proccess a sentinel-2 image but i need it in GeoTIFF format. So, when i translate with gdal_translate to geotiff, it seems to be a geotiff with NBITS=15 that dont work for me. Is there a ...
0
votes
0answers
45 views

R: gdal_translate/gdalwarp/gdalUtils for georreferencing raster

I am currently working on georreferencing a 530 X 587 .bmp file called my_raster.bmp with gdal_translate and gdalwarp from gdalUtils package, which is equivalent to using GDAL with those commands. ...
0
votes
0answers
23 views

Calculating elevation angles from RPCs in NITF files using GDAL

Given a NITF, the RPCs in the NITF, and the center pixel coordinates of the image, I am trying to determine the elevation angle (center ground point to satellite). From what I understand, this can be ...
0
votes
0answers
44 views

Extract value of a latitude/longitude for a NETCDF4 file containing vertex_longitude and vertex_latitude values for OCO-2 product [closed]

I had downloaded a file from https://co2.jpl.nasa.gov/build/?dataset=OCO2L2Stdv8&product=FULL#download The data is freely available and you can download it without registering It is a Netcdf4 ...
2
votes
0answers
51 views

Cannot open TIFF in QGIS after mergin with gdal_translate [closed]

I have merged several TIFF files into a bigger one. When trying to add this image to QGIS I get the following error: Cannot open TIFF file due to missing codec. Raster layer Provider ...
0
votes
1answer
33 views

Using gdal_translate command parameters [closed]

Working from these instructions: https://gdal.org/programs/gdal_translate.html#cmdoption-gdal-translate-gcp I am trying to run the gdal_translate command, here is a sample of the command I run which ...
1
vote
0answers
20 views

Getting subset with same cordinates for different rasters using gdal.translate?

I am a new into Python. I have processed 1000 NDVI rasters covering larger area. I need to burn those NDVI raster with Water mask. The water mask came for whole world I need to subset AOI and also ...
1
vote
1answer
31 views

Clipping with gdal translate does not create a file (Python)

I have tried to clip a geotiff file using the code below: from osgeo import gdal miny=-10.616665787 maxy=38.558338147 minx=34.562256098 maxx=71.187259028 ds = gdal.Open(fp) ds = gdal.Translate(...
2
votes
0answers
31 views

Accessing MODIS subdatasets from the command line?

FYI I'm new to command-line geospatial operations. I'm working with the MODIS BRDF-Albedo Quality product (MCD43A2) and am trying to: 1) do a simple gdal_calc.py operation to mask certain QA values ...
1
vote
1answer
24 views

Gdal_translate does not affect image when only using 2 points

I want to do a 2 point georeference because I don't want to warp the image. I just want to rotate and scale it. I tried using the below arguments, which runs with no errors. It imbedds the points into ...
4
votes
1answer
60 views

Converting GeoTIFF into KMZ image using GDAL_translate returns empty, all black image

GDAL I have installed gdal in the following way: conda create -c conda-forge -n mygdalenv gdal python=3.6 on Ubuntu 18.04.2 LTS. Input GeoTIFF I have a GeoTiff image. The result of gdalinfo input....
0
votes
0answers
35 views

Using gdal_translate with a high number of gcp

I've a CSV file witch describes the coordinates of each pixels in a image, it is structured like this: xcoord,ycoord,row,col 716657.6518375501,4784215.095395751,0,0 716657.6915582813,4784215....
0
votes
1answer
146 views

Converting GeoTIFF to tiles using gdal2tiles

I have a GeoTIFF of weather radar data that I cannot seem to get converted to a raster tileset using gdal2tiles. When the tileset is generated, there are TONS of empty folders in the output directory, ...
2
votes
1answer
87 views

Convert gnomonic projection to Mercator

I'm trying for some time to convert a weather radar map (gnomonical projection) to mercator (EPSG_3395) and then layout it onto third-party web map so far unsuccessfully. The original image: The ...
1
vote
0answers
14 views

Multiband GeoTIFF loading slow in browser

Here's the problem: http://www.doctorharapos.com/webMap/geotiff.html My GeoTIFF files are light, just 4MB My process: starting from an ASCII Esri file I transform it to GeoTIFF using gdalwarp, ...
4
votes
1answer
150 views

MODIS Fire Product tile conversion to GeoTIFF problem

I downloaded a tile (selected tile in the picture) from https://ladsweb.modaps.eosdis.nasa.gov/search/order/3/MOD14--6/2019-08-09/DB/Tile:H25V6 I used gdalinfo on the file. It's output is Driver: ...
2
votes
1answer
76 views

gdal_translate GeoTIFF to KMZ results in transparent image

I know this has been asked before but I have tried just about every post I've found and nothing seems to work. I have a GeoTIFF where areas outside the dataset have been set to nodata When I open the ...
0
votes
0answers
77 views

Tilestache server not serving MBTiles converted using gdal2mbtiles and gdal_translate

I'm getting this error: Exception: Requested format "PNG" does not match tileset format "png" I am using RedHat Linux 7.5 (RHEL7.5). I have setup GDAL 2.4.0 with following options while configuring:...
2
votes
0answers
25 views

TIFF to KMZ passing altitude data

I am currently trying to create a KMZ from a GeoTIFF by using gdal_translate. This Works fine and I am accomplishing this by using by using this command gdal_translate.exe -of KMLSUPEROVERLAY c:\in....
1
vote
1answer
56 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
121 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
154 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
130 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
56 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 ...
1
vote
0answers
282 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
24 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
385 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
2answers
673 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
142 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
153 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
365 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
28 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
100 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
169 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
56 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
173 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
267 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
91 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
124 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
29 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
118 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
61 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
86 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 ...