Questions tagged [gdal-translate]

Command line utility to convert raster data between different formats.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

Why is PROJ not figuring out a CRS?

I am trying to use gdal_translate to convert a WCS source to a tif target. I am trying to achieve this using a WCS XML service description file. The gdal_translate call looks like this "C:\...
0
votes
2answers
26 views

gdalbuildvrt does not support ungeoreferenced image

I'm trying to create a VRT file from a GeoTIFF file using the following command: gdalbuildvrt.exe "C:\Temp\3533.vrt" "C:\Temp\3533.tiff" However it returns this error: Warning 6: ...
0
votes
0answers
20 views

GDAL creates GeoTIFF but y-axis is shifted

When I use this approach to generate a GeoTIFF, I have to add a correction in the y-direction using the TileY xml element, otherwise gdal tries to retrieve the incorrect tiles and generates a blank ...
0
votes
1answer
26 views

Batch conversion of .hgt files to .tif using Powershell returns filename.hgt.tif files

I have a folder which contains DEM in .hgt. I want to convert them via GDAL. So to convert a single file, it's gdal_translate -of 'GTiff' N16E122.hgt N16E122.tif. To do it in Powershell, I figured it'...
0
votes
0answers
24 views

How to use GDAL Warp with images to non-rectangular shape?

So I'm trying to warp this square image into a non-rectangular quadrilateral (pictures below). The source projection is EPSG:4326 and the target projection is EPSG:3857. Right now I'm doing the ...
0
votes
0answers
38 views

QGIS raster band value differs according to zoom/scale when using ascii and GeoTIFF versions of same raster

I converted an ascii raster to GeoTIFF (for the first time), then inspected the result in QGIS seeking confidence in my achievement. What fails: "Identify Features" returns different band ...
1
vote
0answers
26 views

How to convert multi-band CSV file generated from gdal2xyz to multi-band raster file [closed]

Executing the below command has successfully converted a multi-band rasterFile into a multi-column CSV file. gdal2xyz.py -band 1 -band 2 ... -band 9 rasterFile csvFileName.csv csvFile generated:...
0
votes
1answer
31 views

gdal.Translate deletes GTiff instead of overwriting?

Something is wrong with the following attempt to add a band to a raster. I have a GTiff in which I stored numerical values from a field of an ESRI Shapefile. The shapefiles have another field which I ...
2
votes
1answer
52 views

Fastest Possible Use of GDAL to Merge, Reproject & Convert

I have a ~10GB, Australia-wide, single band dataset consisting of 3,351 GeoTIFFs across 8 projections (Map Grid of Australia [MGA], zones 49 to 56). The data has a 2m resolution but only covers urban ...
-1
votes
1answer
29 views

Convert TIFF files to XYZ files with Lat Long and Depth with GDAL

I am hoping to get some advice on converting a GEO TIFF file to an XYZ File with Lat and Long positions instead of Northing and Easting positions. I am very new to GDAL, but I have been able to ...
2
votes
1answer
48 views

Convert NetCDF to GeoTIFF using GDAL upside down

I want to convert monthly precipitation netCDF file, downloaded from TerraClimate data to GeoTIFF and available as 1 file per year. Example: http://thredds.northwestknowledge.net:8080/thredds/...
1
vote
1answer
43 views

Batch convert asc to TIFF

I have 118 asc grid files, I need to convert them to TIFF. I've tried gdal translate but unfortunately GIS keeps crashing. I was hoping I could use python to loop through all of them and save them.
1
vote
0answers
37 views

Importing and updating raster table in GeoPackage using gdal-translate

Based on answered script from a previous question I continued studying GeoPackage documentation but I didn't found a solution to overwrite the table in GeoPackage when the original file (in '...
0
votes
0answers
13 views

TypeError: in method 'GetDataTypeName', argument 1 of type 'GDALDataType'

I am trying to change the height width, apply CRS and change datatype for my raster but i am getting error. I know the error is coming from "output Type" as i have previous ran the code ...
0
votes
1answer
32 views

Meaning of error message for gdal_translate() and gdalbuildtvrt()? [closed]

I am working with gdal_translate() and gdal_buildvrt() from the gdalUtils package in R to merge several batches of a large number of raster files. This is my code gdalbuildvrt(gdalfile = l, # uses all ...
0
votes
2answers
30 views

Setting 0 pixel value to novalue using GDAL in Pythin API

I have a raster data and i want to set the 0 value pixels to NoData using GDAL in python API. I know that you can do this by inputting this code in the command prompt. gdal_translate -of GTiff -...
0
votes
0answers
25 views

GDAL translate not creating .tif when running a VRT file with Python function

I've created a .vrt file using gdal.BuildVRT() and tried to apply a simple Python function Using Derived Bands to multiply original values (all values are 1) and then use gdal.Translate() to write it ...
0
votes
2answers
28 views

Using GDAL_Translater to convert and append TIF files into sqlite database - ERROR 6: New data has not the same SRS as existing data

I have a number of TIF files provided by Ordnance Survey (OS OpenMap Local) that I am trying to add to a sqlite database. The first line in my code creates the sqlite database and adds the first TIF ...
2
votes
1answer
47 views

Translating GeoTIFF in XYZ using GDAL

I try translate GeoTIFF file which 2GB in XYZ with this code import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from osgeo import gdal path = 'D:\Temp\Work\Data\big_dem....
0
votes
0answers
22 views

Which conversions/transformations does GDALs ReadAsArray() use (for GeoTIFF DTM)

I have a bit of a complex problem. The big picture: I want to convert a GeoTIFF DTM to a 2D "Image"/matrix where the value of each pixel represents the height. Later I want to read the ...
1
vote
0answers
44 views

Convert a one-band GTIFF to PNG with adjusted color ramp using GDAL

I have a one-band fCover GTiff with values ranging between 0 to 0.4 and I would like to convert it to a png using a color ramp adapted to this tiff. I already have a png from this tif but the color ...
0
votes
0answers
28 views

Move a raster image with gdal_translate northwards

Is it possible to use gdal_translate to move a raster image in northward direction? That is, shift the latitude origin of the image whithout changing other parameters or specifying the entire bbox. ...
0
votes
0answers
21 views

How to create MBTile file from local XYZ tile directory using gdal_translate

I have a local XYZ tile cache in directories from zoom level 0 to 14 of a curtain area. I would like to build a .mbtiles file from the png's in these directories to serve as a layer from geoserver. ...
0
votes
0answers
34 views

How to use VSIMEM with NetCDF?

I saw this post that showed you can save gdal.translate() outputs in virtual memory using VSIMEM. Looking through the GDAL docs, it looks like the netCDF driver doesn't support virtual filesystems. ...
4
votes
1answer
84 views

Importing multiple raster files into GeoPackage

I'm looking for an alternative to import multiple raster files into a GeoPackage other than dragging and dropping via QGIS Browser (sometimes takes to long or returns error). Following this post I'm ...
1
vote
0answers
23 views

Adding Z (elevation to image when georeferencing with gdal_translate and gdalwarp via gcps)

I have been trying to georeference an image with given gcps (X-Y coordinates and Z (elevation) coordinates). However, when I add gcps via gdal_translate it adds elevation Z but as soon as I use ...
0
votes
0answers
52 views

Why am I getting nodata values from gdal_translate only when bounding box under a certain size? Is there a minimum bounding box size?

Problem: If my bounding box is too small, I get nodata I am using gdal_translate to convert a .vrt into a .tif. If my bounding box is large, it works perfectly. BUT as soon as I decrease the size of ...
0
votes
1answer
118 views

gdal_translate ERROR 6: Too many command options

I'm using GDAL 3.3.1 on Windows 10 through Anaconda. I'm trying to convert a TIMESAT binary file to a .tif, which I've been able to do before. However, when I enter this code: gdal_translate -of GTiff ...
0
votes
1answer
61 views

How to add coordinate system to SPOT imagery mask files?

I'm working with SPOT 6 and 7 imagery delivered in DIMAP format. I've figured out how to extract the multispectral and pan-chromatic bands into geotiff with gdal-translate so they're easier to work ...
0
votes
0answers
22 views

Apply a VRT file to GDAL Translate in C#

I have been looking at this example to work out how to apply a Gauassian Blur to a GeoTiff: How to convert GeoTIFF to grayscale and add gaussian blur? A VRT file is created and this is used in the ...
2
votes
1answer
62 views

Using WMS XML in gdal.Translate()

I am using gdal.Translate() of Python instead of command line gdal_translate. Most of the options in GDAL. Translate are the same with gdal_translate and I could find them easily in gdal....
2
votes
0answers
32 views

gdal_translate grib2 to xyz producing unexpected lat/lon centroid

I am finding unexpected lat/lon values in an output CSV file after converting grib2 to XYZ in gdal_translate. The grib2 file can be found here on Google Drive in case anyone wants to look at the data. ...
1
vote
1answer
84 views

What is the gdal_translate scale exponent option for?

gdal_translate has the option -exponent <exp_val> to use in conjunction with -scale that will apply non-linear scaling with a power function. exp_val is the exponent of the power function (must ...
0
votes
0answers
27 views

How to change extent of GeoTiff image using gdal

I am trying to blend satellite imagery with hillshade imagery using opencv. Once the blending is done, I save the result as tif file. But the output tif file doesn't show the same extent/coordinates/...
0
votes
0answers
21 views

GDAL - Colourise polygon ndvi from sentinel 2-A data

I am trying to take a sentinel 2-A jp2 file and along with coordinates for a given polygon, generate the colourised ndvi of that polygon and where everything outside of the polygon is transparent. I ...
1
vote
1answer
111 views

Merging rasters with alpha channel using GDAL

I need to merge 13 GeoTIFFs with (RGB+alpha channel) into one, some of them touch each other. For tests I used only two of them. I was trying to use gdalbuildvrt tool and gdal_translate afterwards, ...
0
votes
1answer
51 views

Add color table to NDVI using GDAL

I have an NDVI tif file that was generated from Sentinel 2A data using the gdal_calc method. I now want to add a red-green colour table to this file so that it matches the image below. I have managed ...
0
votes
0answers
30 views

Creating large base map quickly

I'm new in map. I try to create map tile. I start with GeoJSON and using QGIS 3 to parse it into PNG tile. But when I add more data in layer, I have to run it from beginning. It very slow in zoom ...
2
votes
0answers
64 views

gdal_translate Radial NetCDF to GeoTIFF does not create georeferenced image

I have weather radar data inside of a radial-NetCDF file. The public link to the file in question is here on my google drive. The variable name is "BaseReflectivityDR". I would like to ...
0
votes
2answers
72 views

gdal_translate COMPRESS=JPEG SyntaxError: invalid syntax error

Following is the code I'm using to compress set of .tif images to .jpg. My objective is to iterate through each .tif image and create a new set of compressed jpg images. from osgeo import gdal import ...
0
votes
1answer
60 views

gdal image quality problem when using gdalbuildvrt?

I have ~1000 1GB images that I want to make into a COG w/ JPEG compression. Any time I try to use gdalbuildvrt to create a vrt of my entire directory of images then I get big quality loss. Can ...
1
vote
0answers
85 views

Why does this HDF4 file converted to .tif with gdal come out at a coarser resolution?

I'm currently working with large-domain MODIS data. These come in multiple separate HDF4 files which I stitch together into a virtual data set (VRT), reproject into EPSG:4326, sub-set to the domain of ...
0
votes
0answers
44 views

How to convert ECW to PNG with gdal_translate while preserving colors

I am trying to convert some ECW files to PNG using the command gdal_translate test.ecw -of png test.png, but the PNG file comes out grayscale. How do I produce a colored PNG from an ECW file using ...
5
votes
1answer
122 views

Converting HDF to TIFF using batch processing with gdal_translate

I have a huge MODIS dataset and I need to translate them to tiff from hdf. My input path is: C:\Users\HP\Desktop\deneme\ham_veri and hopefully, the output path is: C:\Users\HP\Desktop\deneme\yeni This ...
1
vote
1answer
28 views

Using gdal to convert SInt16 DEM to UInt16 DEM, while setting nodata value to 0xFFFF

Can this be done on the command line? I'm working with the Mars MOLA DEM GeoTIFF. Unfortunately, my framework can't deal with signed values, so it gets really confused when it looks at the data. I ...
0
votes
0answers
19 views

Loading GeoTIFF altimetry file created from GDAL or QGIS into a GeoServer failed

GeoServer version : 2.18.2 GDAL version : 3.1.4 QGIS version : 3.16.3 I have a GeoTIFF altimetry file with some missing data which is loaded perfectly in my GeoServer. I just extracted a new GeoTIFF ...
1
vote
1answer
26 views

Calculate the mean of files generated from gdal.Translate

I created several velocity maps from .nc files through gdal.Translate. Each .nc file is organized in several bands, I am only interested in 1: velocities. gdal.Translate allows me to select only the ...
2
votes
1answer
78 views

Modify original ColorTable in VRT & TIFF files

I'm looking to modify the original ColorTable, when georeferencing, PNG => gdal_translate + gdalwarp => TIFF. gdal_translate -of VRT -a_srs EPSG:4326 ' + file_png + ' ' + file_vrt + ' -a_ullr ' +...
0
votes
1answer
96 views

Image is South up while converting NetCDF layer to GTiff with gdal_translate

Issue: I'm trying to extract a NetCDF layer to GeoTIFF. The output GeoTIFF image has the South up. What I need: The output GeoTIFF image with North up. GDAL version: 3.2.2, released 2021/03/05; OS: ...
0
votes
0answers
40 views

Merging TIFF files creates offset / deformation

I have a PNG library (524288 tiles of 256px * 256px) which I georeferenced via GDAL. This first part works correctly. ullr: ulx = (360 * (column / 1024)) - 180 uly = 90 - (180 * (line / 512)) lrx = ...

1
2 3 4 5
10