Questions tagged [gdalwarp]
A Geospatial Data Abstraction Library (GDAL) image mosaicing, reprojection, and warping utility.
670
questions
1
vote
0
answers
14
views
Georeference and Rotate an image using GDAL and python
I have a drone image with no spatial reference (ungeoreferenced). I know from some calculations the coordinates of the upper left corner, and X and Y resolutions. I was able to georeference the image ...
0
votes
0
answers
17
views
GDAL clip raster by mask layer in Qgis 3.24.3-TIsler produces error "ERROR 1: Cutline transformation failed"
As the title implies. The shapefile seems to load just fine. Below is the screenshot showing an apparently well-formed cutline.
Here is the log file:
QGIS version: 3.24.3-Tisler
QGIS code revision: ...
0
votes
1
answer
32
views
Polygonizing global raster using Python/GDAL?
I'm looking to polygonize a global raster with 29 different categories. However, when I try to run it in QGIS, it either crashes or takes forever to load.
I'm now trying to run it in python.
import ...
1
vote
1
answer
28
views
gdalwarp without reading the whole file, just coordinates
I'm working with a multiple remotely hosted, large files.
I want to apply gdalwarp on them all, but I don't need the raster data; just the new corner coordinates.
Is there a way to use gdalwarp ...
0
votes
0
answers
10
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 ...
0
votes
0
answers
21
views
GDALWARP masking first then reprojecting, want it to do vice versa. What defines order of operations in GDALWARP?
I need GDAL to reproject a raster to a new CRS and cell size (smaller than the original, don't ask why), then mask the raster to a polygon.
Here is the command
gdalwarp -overwrite -t_srs EPSG:26917 -...
0
votes
1
answer
36
views
Inconsistent results between gdalWarp (with cutline) and rasterio.mask
Cropping with GDAL cutline vs Rasterio.mask with crop=True results in arrays with different sizes (by one row). I've tested the different Rasterio options but no luck. I'm hoping to match the GDAL ...
1
vote
1
answer
24
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 ...
1
vote
0
answers
21
views
Reproject Data on to WRF grid
I have MODIS data EVI and LSWI which I want to fit to WRF grid which in LCC projection system, I can read specification using CEN_LON, LAT1, LAT2. Based on that I have reprojected my TIFF files using ...
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 ...
0
votes
1
answer
48
views
Is it possible to use gdalwarp to create a TIFF file from a vector layer?
Let's say I have a shapefile that has different polygon geometries as the following:
I'd like to create a raster with the area inside these polygons filled with a specific color. Something like a ...
3
votes
1
answer
26
views
How to cancel 'GDALWarp()' in GDAL Utils (C API)?
My iOS app allows users to reproject rasters to different spatial reference systems. This is implemented with GDAL Utils (C API, in a Swift wrapper) to run a GDALWarp(). Sometimes these operations ...
0
votes
0
answers
27
views
gdalwarp ERROR 1: Too many points (529 out of 529) failed to transform, unable to compute output bounds
I have two large tif raster datasets in EPSG:4326 and I want to project them to a pseudocylindrical projection (it is a custom projection based on proj=putp1 https://proj.org/operations/projections/...
0
votes
0
answers
23
views
Terrain correction TerraSAR-X images
I am trying to perform terrain correction on a SAR image using GDAL.
I tried using simple gdalwarp, but the accuracy is not enough for me, so I decided to use:
gdalwarp -multi -wo NUM_THREADS=ALL_CPUS ...
0
votes
0
answers
17
views
Down Sample Resolution Change Band Sum
I collected information from WorldPop about the Italian population in 2000 that is a geoTiff with a spatial resolution of 100m. The data can be downloaded here.
I would like to change the resolution ...
0
votes
0
answers
17
views
Aligning rasters in QGIS modeler
I want to align several rasters during a QGIS modeler procedure (currently QGIS 3.16).
In QGIS Desktop I can do this using the "Align rasters" tool given in the Raster submenu:
In the ...
3
votes
1
answer
122
views
How do I stop gdal.Warp() in Python increasing a raster's extent when clipping to a shapefile with a greater extent
I have a set of GeoTIFFs each covering a subset of a country that I want to clip to the coastline of that country. I have a single shapefile that defines the coastline of the country. As I have a ...
2
votes
1
answer
70
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 ...
2
votes
1
answer
47
views
QGIS: reprojecting .tif from EPSG:3857 to EPSG:4326 - Output Darkened
I'm using QGIS to re-reference a batch of satImages from one CRS to another. I've got it to run and complete, that's fine. However, looking at the images pre-processing they are bright and vivid in ...
1
vote
0
answers
20
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
28
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
37
views
QGIS (Warp - Reproject) and ArcGIS Pro (Project Raster - Data Management) result in different results
I recently projected a raster from EPSG:6340 (NAD83(2011)/UTM zone 11N) to EPSG: 32611 (WGS 84/UTM zone 11N) using the "Warp (reproject)" tool in QGIS (i.e., the gdalwarp). I noticed that ...
1
vote
0
answers
54
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 ...
0
votes
0
answers
24
views
using gdal to merge Sentinel 5p projected tiff files without the overlapping at borders?
I have used gdalwarp for extracting Sentinel 5p L2__AER_AI data product to 14 tiff files in EPSG:4326 CRS.
These projected tiff files can be gotten from https://drive.google.com/drive/folders/1AHuH6n-...
1
vote
1
answer
250
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
35
views
gdalwarp: "ERROR 1" while projecting large dataset (Too many points (..) failed to transform, unable to compute output bounds.)
I'm trying to transform a large dataset from EPSG:4326 to ESRI:54009 using the gdalwarp CLI.
When I try to convert the whole dataset I get ERROR 1 + Warning 1 pairs:
$ gdalwarp -of netCDF -co FORMAT=...
1
vote
0
answers
28
views
gdalwarp antimeridian issue
I realise there are similar questions but I could not find the exact same.
Here is what I am trying to do:
gdalwarp -t_srs '+proj=stere +lat_0=YY +lon_0=XX +k=1 +x_0=0 +y_0=0 +a=1737400 +b=1737400 +...
3
votes
1
answer
39
views
Gdalwarp clip with negative buffer
Is there any simple way to change this command:
gdalwarp -tr 10 10 -cutline "shape.shp" -crop_to_cutline -of GTiff "S1A_IW_GRDH_1SDV_20200719T161950_20200719T162015_033526_03E28C_C720....
0
votes
0
answers
69
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
73
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 ...
2
votes
0
answers
70
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
45
views
Reprojecting GeoTIFF from EPSG:4326 to EPSG:3857 with GDAL
As an example I am using the following GeoTIFF image: BlackMarble_2016_3km_geo.tif - 61 MB - GeoTIFF
I am trying to reproject from EPSG:4326 to EPSG:3857 with the following GDAL command:
gdalwarp -...
0
votes
0
answers
49
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
1
answer
57
views
Resolution of Python GDAL-generated GeoTiff different from plotted image
The Situation
I use the GDAL library to warp geotiffs (subsequently referred to as "rasters") of different resolutions (30m and 500m) to a 100m (subsequently referred to as "default&...
0
votes
0
answers
49
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('...
0
votes
0
answers
20
views
Batch Processing - gdalwarp - NetCDF with multiple layers
I have approximately 10000 NetCDF files, each with 4 different layers. I need to use gdalwarp within QGIS for all these files.
Using batch processing, I can select files by *.nc pattern but this does ...
0
votes
0
answers
33
views
Cut out polygons from a large raster
I'm trying to cut out polygons from a large raster using gdalwrap by mask .kml.
When I don't set the resolution of the output file everything works great.
gdalwarp -dstnodata -9999 -q -cutline ...
0
votes
1
answer
99
views
GDAL resample 30m file to 90m
I have an SRTM file in DTED format obtained from EarthExplorer spanning 1 degree latitude by 1 degree longitude and containing 3601x3601 pixels at 30m spacing. The pixel size resolution is 0....
2
votes
1
answer
71
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
1
answer
49
views
Clip Raster with Shapefile GDAL API
I am trying to clip a raster using a polygon an GDAL. The following code is running without an error but the ouputimage is all zeros. All files are in the same CRS. Is there a way to use GdalWarp with ...
1
vote
1
answer
36
views
Coordinate Operations Error for NAD83(2011) Alaska Zone 1
I am receiving the following error below when running gdalwarp to crop an input orthomosaic in the NAD83(2011)-Alaska Zone 1 CRS. The command still runs and the output cropped TIFF file renders fine ...
1
vote
1
answer
59
views
How can I use spatial functions inside -csql with gdalwarp?
I'm using the following command to cut a GeoPackage from a GeoTIFF file:
gdalwarp -of GTiff -cutline input_database.gpkg -crop_to_cutline input_raster.tif output_raster.tif
Additionally, I know I can ...
3
votes
2
answers
107
views
Is it possible to clip a shapefile from a raster layer using gdalwarp?
I have a shapefile with a single geometry as the following:
I also have a GeoTIFF raster that I can put behind this vector layer... I'd like to find a way of programmatically clipping this shapefile ...
0
votes
0
answers
64
views
gdalwarp releases memory VERY slowly
I’m trying to use gdalwarp to merge and reproject many elevation tif files (DEM).
To do so I first create a VRT file from all the tif files and then convert and reproject to one big tif file.
This is ...
0
votes
0
answers
119
views
gdalwarp options for speedy processing
In QGIS 3.16, I am clipping a large raster (48000P x 44000 L) by a vector, and trying to use the options to crank it up to "all systems go" i.e. fastest processing possible for this dataset.
...
0
votes
0
answers
42
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
1
answer
50
views
Python GDAL Warp netcdf creating NaN values at 360 longitude
When I attempt to use GDAL warp to reproject from 1.875x1.25 to 0.5x0.5 res NaN values are produced at the 360 longitude mark. The data is in NetCDF format. Using average or mode resampling algorithm ...
0
votes
2
answers
138
views
Problem with gdal.WarpOptions concerning reference
I have a tiff file that I want to crop down to a shp cutline and reproject.
If the code is:
clip_spec=gdal.WarpOptions(format='GTiff',cutlineDSName=os.getcwd()+'/moksha/DEM/cutline2.shp',cropToCutline=...
0
votes
0
answers
38
views
Requirements or limits for tiling a huge number of TIFFs
I want to create webtiles from the topographic maps of large areas, eg. a whole country. So I have some 100 GeoTIFFs, all 4000x4000.
So first I create a vrt:
gdalbuildvrt tifs.vrt tifs/*.tif
Second ...