Questions tagged [gdal-translate]
Command line utility to convert raster data between different formats.
492
questions
0
votes
0
answers
18
views
Setting Output Data Type in ArcPy GDAL
I'm using ArcPy through a notebook in ArcGIS Pro 2.9.3. I'm trying to use gdal.Translate and gdal.TranslateOptions to translate a .tif file to a 32 bit signed integer .rst file. I've been able to set ...
0
votes
0
answers
22
views
Georeferencing Google Map image with GDAL, display coordinate values in WGS84
Framing this post with the question first.
Question
Can a GeoTIFF based off of the Google Mercator projection be warped or transformed to display WGS84 lat/long coordinates as opposed to northing/...
0
votes
1
answer
21
views
Georeferencing Google Map image with GDAL, display coordinates in Lat/Long [closed]
I am saving an image (.jpg/.png) from Google Maps. I used to be able to just do my own lazy-man's way of an Affine transformation, and it USED to work for my needs. A simple .JPG and .JGW file (ESRI ...
0
votes
1
answer
28
views
Converting a NetCDF with multiple variables to GeoTIFF calling GDAL_TRANSLATE function from Python
gdal_translate -a_srs EPSG:4326 NETCDF:"file_name.nc":variable_name output_file_name.tif -a_ullr -9.21200 53.28058 -8.88045 53.11338
I am working on some NetCDF files that include multiple ...
0
votes
1
answer
19
views
gdal_translate TIFF to PNG with added alpha
I am using gdal_translate to create a Cloud Optimized GeoTIFF:
gdal_translate ${lvl2_cub} ${tifname} \
-co COMPRESS=LZW -co TILED=YES -b ${gdalidx} -co BIGTIFF=YES \
...
0
votes
0
answers
12
views
GDAL_translate and HEGtool
I am using GDAL to convert a huge dataset of HDF into GEOTIFF. When I tried with the HEG tool the tiff file was according to my requirements, but when using GDAL I think the projection gets shifted ...
1
vote
1
answer
25
views
Scaling problem when projected map is overlaid on basemap in QGIS
The problem
My georeferenced and projected Matplotlib map overlays with an offset on a basemap projected in QGIS with the same coordinate reference system.
What I did:
I created a map in Matplotlib ...
0
votes
2
answers
25
views
Doubling of filesize with GDAL after transformation despite similar compression
I am trying to process an elevation model in COG with GDAL using gdalwarp and gdal_translate, to change the height values from AHD (australian height datum aka sea level) to ellipsoid.
The ...
1
vote
0
answers
44
views
GDAL GeoTIFF compression from WEBP to JPEG/LZW creating tile-edge artefacts when adding overlays
Desired Outcome
An JPEG or LZW compressed output tiff with overlays, with transparent "no data" zones, and no black "edge artifacts" on the border between "data" and &...
0
votes
1
answer
29
views
Is there any way of making gdal_rasterize or gdal_translate create transparent pixels on the output image created?
I'm using the gdal_rasterize to create a TIFF file from a GeoJSON input and gdal_translate to convert the TIFF file to PNG. The code that I'm using is the following:
gdal_rasterize -burn 0 -burn 0 -...
0
votes
0
answers
39
views
Use in-memory objects to process raster maps using GDAL's Python API
Below are three GDAL supported raster map processing commands, set inside a Bash shell helper function, defined inside a script that'd patch ERA5-Land with ERA5 data (see also: Merge ERA5-Land and ...
0
votes
1
answer
30
views
Unable to make GeoPackages and MBTiles compatible in MapTiler Cloud using gdal_translate
I'm using gdal_translate to convert TIF files to GeoPackage and MBTiles. The geopackage/MBTiles are uploaded to MapTiler Cloud. They upload to MapTiler Cloud even if they are not "clean tileset&...
0
votes
0
answers
13
views
gdal_translate with aux.xml as input
I'm trying to translate a tif file to EPSG3857 system. I have an .aux.xml file that contains GCP pairs generated from ArcGIS after georeferencing.
I know that gdal_translate could take GCP pairs as ...
2
votes
1
answer
76
views
Create rectified GeoTIFF given aux.xml produced from ArcGIS
I'm trying to create the rectified GeoTIFF image, given a raster TIFF image and aux.xml file generated from ArcGIS. The aux.xml contains information about the mapping from raster TIFF image to the ...
0
votes
0
answers
30
views
Is it possible to pre-filter band values from WMS/TMS wit GDAL?
Context: I am downloading some raster data from a WMS (TMS actually) by using gdal.translate() in python. Afterwards, since I am only interested in the highest values of the RGB raster bands (band ...
1
vote
0
answers
21
views
Terrain correction in SAR image
I am new to the gdal utility. Using DEM data of the Moon, I am trying to perform terrain correction on SAR images. I have a DEM file and SAR data into tif file format. Both DEM and tif file are in ...
0
votes
1
answer
29
views
How to mosaic Sentinel bands with correct order in GDAL
I'm new with GDAL and I'm trying to mosaic different bands from Sentinel 2 in order, what I want to get is a raster file with right order band2, 3, 4, 5, 6, 7, 8, 8A, 11, 12. The picture below is the ...
1
vote
1
answer
40
views
gdal_translate on WCS: Unable to export GeoTIFF files with zero bands
In accordance with GDAL's WCS examples, I am trying to use gdal_translate to import a GTiff raster from a coverage.
The server in question is a GeoServer instance of the German Weather Service (DWD) ...
0
votes
0
answers
23
views
How to convert transverse_mercator to regular lat/lon
I want to transform this file from transvers_mercator to a regular lat/lon netcdf file.
My input file:
netcdf toto {
dimensions:
x = 548 ;
y = 704 ;
variables:
char transverse_mercator ;
...
1
vote
0
answers
61
views
Using GDAL translate with VRT - merge error in overlap creates black 📦
I have a series of hi resolution multispectral images from Maxar's WV2 in .NTF form. I am trying to stitch tiles together to create a single image, and I've been having a lot of trouble. I initially ...
1
vote
1
answer
291
views
Installing GDAL on MacOS with Homebrew?
I am trying to install GDAL on MacOS with Homebrew. But failed. I started with the following commands:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install....
0
votes
0
answers
13
views
Create .tif file no external Files but with colors & classnames: gdal
I am used to using .img ERDAS native files and all you get is a .img. When you open the .img there are class names, colors ect., however you have set up your attribute table. I want that in geotiff ...
0
votes
0
answers
89
views
Removing Alpha Band using GDAL results in black nodatafill
In QGIS I have saved a raster that I styled as a Rendered Image. This saves me the trouble of uploading a style on geoserver and applying the style to the geotiff. It should also decrease the file ...
1
vote
1
answer
75
views
Cropping with GDAL python outputs a black section in the image
I am trying to crop an image using GDAL python.
I have tried using both gdal.Warp and gdal.Translate, and both keep bringing the same result.
I have an image that I have orthorectified using gdal.Warp ...
0
votes
1
answer
30
views
gdal.Translate results in a raster which has another extent
My input is this file
which gives me an output file through the code:
inputraster=gdal.Open('input_file.tif'),gdal.GA_ReadOnly)
optt=gdal.TranslateOptions(format='PCRaster',bandList=[1],outputSRS='...
2
votes
0
answers
73
views
GDAL warp and translate on EASE-2 crossing the IDL
I have some GeoTIFF data defined on an EASE-2 grid that I would like to convert into a PNG image using the WebMercator projection. gdalwarp does the job quite well except for a few files that cross ...
0
votes
0
answers
28
views
Gdalwarp for terrain correction in SAR image
I am new to the gdal utility. Using DEM data of the Moon, I am trying to perform terrain correction on SAR images.
Here is gdal commandline code ```
!gdalwarp -multi -wo NUM_THREADS=ALL_CPUS -co ...
0
votes
0
answers
43
views
gdal.translate via os.system/subprocess
I want to run a gdal.translate command via os.system() or subprocess.run() inside a script.
I tested the following ways of running the command:
Directly in the command-line:
Starting python from the ...
0
votes
0
answers
50
views
Polar StereoGraphic projection
I have two files with the projection information
Image 1
'GEOGCS["Moon Spheroid",DATUM["Moon_Spheroid",SPHEROID["Moon Spheroid",1737400,833.3333]],PRIMEM["Greenwich&...
0
votes
0
answers
84
views
Using gdal.Translate to extract tile from Google Cloud Storage Bucket Cog File without reading the whole file
I am able to open the file using /vsigs/ on-the-fly without downloading it but each time I use gdal.Translate, it takes a long time to extract a tile for each modification of projWin parameter. Any ...
0
votes
0
answers
50
views
Resampling of Sentinel-1 data to 1km resolution using gdal and snappy modules
I am trying to resample my preprocessed Sentinel-1 data to 1km resolution. I am facing the following issues when I try to do it using snappy and gdal modules.
Using gdal,
Used code:
os.system('...
1
vote
3
answers
66
views
Terracing / stepping artefacts after converting lidar DTM from float32 to uint16
I am a beginner QGIS user, using it to supplement other skill sets in 3D modelling and rendering.
I am trying to use UK lidar data in Blender to render 3D topographic maps. For this to work correctly ...
0
votes
1
answer
88
views
Using gdal_translate in node-gdal?
How can I use gdal_translate in node-gdal?
I'm trying to use the following command:
gdal_translate C:\test.tif cog.tif -co TILED=YES -co COPY_SRC_OVERVIEWS=YES -co COMPRESS=DEFLATE.
2
votes
1
answer
74
views
Tile a large VRT with different resolutions
I have a large raster GeoTIFF of the whole world with a low resolution, and also parts of the world with higher resolutions. Some very high, some medium high resolution.
Now I would like to create new ...
0
votes
0
answers
42
views
Assigning georeference to NetCDF
I am trying to understand how to georeference a NetCDF DEM raster file (topo_d3.nc) using gdal_translate, by 'distributing' the raster pixels between the UL-LR coordinates - which I have extracted ...
1
vote
2
answers
91
views
GDAL script to merge geotif images by placing each band input into a separate band
In QGIS when I merge two images with 3 and 5 bands respectively via Raster >> Miscellaneous >> Merge with the option checked on place each input into a separate band it resulted in a ...
7
votes
3
answers
289
views
GeoTIFF creation using gdal_translate fails to produce expected result
I am converting weather radar data (grib2) to raster tiles for Mapbox. The resulting tiles are mis-aligned from the original grib2 data and I am not sure why. I have a 4-step process using GDAL in the ...
1
vote
0
answers
77
views
gdal_translate of KMLSUPEROVERLAY issues making nodata transparent
I'm trying to use gdal to make a superoverlay KML / KMZ from a single band .tif (GTiff / GeoTIFF) which I created in ArcGIS. I want the nodata region to be transparent, but it has been showing up as ...
0
votes
0
answers
15
views
LabelImg dark translated images from gdal in python
I have translated some images from Gtiff to PNG with Gdal in Python. When I view the png image in qgis everything is fine. When I import it in LabelImg in order to annotate it and afterwards train a ...
0
votes
1
answer
76
views
GTiff to PNG conversion- Gdal Python
I am trying to convert a Gtiff image to PNG using Gdal in python with gdal_translate.
My gtiff has the following properties:
Width 255
Height 255
Data type Float32 - Thirty two bit floating point
...
0
votes
1
answer
41
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
2
answers
226
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
0
answers
30
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
1
answer
47
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
0
answers
43
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
0
answers
43
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
0
answers
68
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
1
answer
121
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
1
answer
437
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
1
answer
112
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 ...