Questions tagged [gdalwarp]

A Geospatial Data Abstraction Library (GDAL) image mosaicing, reprojection, and warping utility.

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

Python subprocess not recognising gdalwarp option

I have been trying to use the subprocess module in python to perform the gdalwarp command. To do so, I have done it like so # use pixel size for GDAL WARP command print('Pre warp') warped_file = ...
1 vote
0 answers
24 views

GDAL - NetCDF to colorized raster

I have a NetCDF file that is satellite imagery. I would like to convert it to a raster image, with color, using gdal on the command line. Here is what I have so far: gdal_translate -unscale NETCDF:&...
1 vote
1 answer
25 views

GDAL warp in C++

What is the equivalent to the following GDAL terminal command in C++? I looked into GDAL C++ API, but could not figure it out. gdalwarp -te xmin ymin xmax ymax -ts 1 1 -r max input.vrt output.vrt for ...
  • 21
0 votes
0 answers
14 views

gdalwarp -crop_to_cutline causes file to get much bigger? [duplicate]

I am cropping a raster with a shapefile mask. Ideally I would like the output just to include the area of the raster that is covered with the mask. (For processing later in my workflow it currently ...
  • 375
0 votes
0 answers
20 views

Can GDAL Warp use update-in-place to write multiple files into a single output file? [closed]

The question: Can GDAL Warp do an in-place update where the valid existing values are not overwritten by nodata values from the latest warp operation? (Looking for a simple Y/N answer) UPDATE (9/26/22)...
  • 101
0 votes
0 answers
23 views

GDALWarp Reprojecting raster extent from (0, 360) to (-180, 180) filling left hemisphere with blank data

Understanding that this question has been asked a few times (Reprojecting raster from 0 360 to -180 180 with cutting 180 meridian using gdalwarp seems to be the canonical one), I've found that any ...
0 votes
1 answer
34 views

GDAL: Reprojecting geotiff from LATLONG to UTM

I have a file in geotiff format, with coordinates in WGS84. I would need to convert from WGS84 to UTM. When I launch the code via GDAL: gdalwarp -t_srs '+ proj = utm + zone = 37 + datum = WGS84 + ...
  • 1
0 votes
0 answers
19 views

Fixing gdalwarp bounding box when trying to orthorectify using GCPs

I'm trying to orthorectify a raw, raster satellite image with a set of ground control points (GCPs) using gdalwarp. I first create a temporary tif to add in the GCPs using gdal_translate, then I ...
0 votes
0 answers
21 views

GdalWarp transform to EPSG:3857 keeping poles

I have an image which I can successfully transform to EPSG:3857 for use as an overlay in leaflet (open street maps). However, this naturally crops the poles of the image and I am wondering if there is ...
1 vote
1 answer
15 views

gdalwarp antimeridian problem on TIF with GCPs

I've got a non-projected TIF with 440 GCPs (a Sentinel-1 image) that crosses the antimeridian. Normally I just call gdalwarp with -t_srs (in this case 'epsg:3031' Antarctic Polar Stereographic), ...
  • 11
1 vote
0 answers
20 views

Tile GeoTIFF images in locations far from each other in one layer

How to tile two aerial TIFF images from two cities in one layer? I understand that first, I should create a virtual layer (vrt) and then tile it after reprojection. However, gdal2tile creates too many ...
0 votes
1 answer
39 views

gdalwarp doesn't cut by shape lines

I have raster files and shapefiles. I am trying to clip raster image by shapefile using gdal.Warp, however, the result is somehow disoriented. I tried to use coordinate system parameters, but nothing ...
  • 580
1 vote
1 answer
42 views

GDAL coordinate transformation not aligning with QGIS coordinate transformation

I have a raster being changed from EPSG:27700 to EPSG:3857 coordinate reference system. Within the QGIS application, I have found this coordinate transformation to fit the best I've tried to ...
1 vote
0 answers
28 views

Creating custom initial projection in GMT/GDAL

I have a number of images which I need to project into the standard IAU 2000 lunar coordinate system. Each is defined in terms of an oblique cylindrical projection, and I am given the rotation pole/...
1 vote
2 answers
42 views

Loading and reprojecting .nc file without projection

I am trying to extract some bands from a .nc file. I don't know the file projection (if there is one), thus I created in GRASS GIS a newLocation with no projection (just a XY Cartesian plane) and ...
0 votes
1 answer
26 views

QGIS - How to check if a raster has same resolution as another raster with a different CRS?

I have an original raster file called SAM. This has a resolution of 0.0025 pixels, it was obtained using 100m resolution satellite. I have another raster called Global fire. This has a pixel ...
0 votes
0 answers
26 views

Vertical datum transformation of raster using gdalwarp

I need help on coordinate transformation issue that I have been trying to fix for quite some days now. I want to calculate snow depth by differencing snow-on and Snow-off lidar DEM. When I did the ...
  • 1
2 votes
1 answer
47 views

gdalwarp to change my raster extents

I'm trying the gdalwrap command to set center and change the extent to -180 to 180. But for some reason, the bounding value is set but the pixel values are not transferred. This solution not working: ...
0 votes
0 answers
37 views

gdal2tiles.py Only Creating Images for Max Zoom

I set off some tasks running gdal2tiles.py for certain rasters with a zoom range of 8-20. To my dismay I return the next day to find only images for zoom level 20 have been created. I understand that ...
0 votes
1 answer
47 views

Unable to merge TIFFs in one file using Warp and QGIS

I have three TIFFs are below which is belongs to Alaska HI Chart: First https://drive.google.com/file/d/1KllacOdKNw866doqjMcounsvofpXBgFh/view?usp=sharing Second https://drive.google.com/file/d/...
3 votes
1 answer
27 views

gdalwarp band values of 0 turning to nodata

In executing gdalwarp on an RGB TIFF to clip out an extent, the output TIFF changes values of 0 within a band to NoData. I cannot find anything explicitly referencing this scenario. Is there a flag to ...
  • 1,319
0 votes
1 answer
88 views

Orthographic Projection of Mars (MOLA) in QGIS - Visually correct results, wrong coordinates

I am trying to reproject the coloured shaded relief map of Mars (MOLA). After many tries, I got an orthographic projection of the scene centred on the pole, however, the coordinates are wrong. I ...
0 votes
0 answers
44 views

GDAL warp not transforming raster properly

I have a raster Tiff image which I want to reproject from EPSG:27700 TO EPSG:3857 in GDAL. Using gdalwarp -s_srs EPSG:27700 -t_srs EPSG:3857 C:/test/input.tif C:/test/output.tif I have noticed that ...
0 votes
0 answers
49 views

Defining exact projection in GDAL command

I am using gdalwarp to convert a tiff from one projection to another. I want to specify the t_srs as the same transformation/projection type I've been using in QGIS which reads as below +proj=pipeline ...
2 votes
0 answers
62 views

Python - same GDAL command giving different results

I've been using GDAL warp to re-project a tiff I have. On the GDAL commandline I use gdalwarp -t_srs EPSG:3857 C:/test/test_file.tif C:/test/test_file_gdal.tif Similarly, I wanted to run this function ...
1 vote
1 answer
62 views

GDAL warp not aligning two rasters perfectly

I'm trying to align one raster to another using GDAL Warp. I've read that it's important to pick a reference image and use its extent coords, cell resolution and the -tap argument to force the second ...
  • 635
0 votes
1 answer
45 views

How to mosaic/merge multiple tiles exactly, eliminating gaps?

I have multiple scenes from planet doves and I need to mosaic them together to have one raster. I used build virtual raster in qgis and I have smth like this is it possible to exactly merge without ...
1 vote
1 answer
33 views

Calculating terrain attributes before or after upscaling DEM

This is more of a theory question. I am working on a project that requires the use of topography data, I have a 1KM resolution global DEM to which I will be using GDAL to calculate general topography ...
0 votes
0 answers
56 views

Create lat-lon mesh grid from MODIS HDF4 file GDAL

I have a Python code that reads HDF4 files for different satellite products. I am having issues obtaining the underlying grid that it uses. In panoply I can see the variables XDim and YDim that have ...
  • 187
0 votes
0 answers
67 views

gdalwarp reproject "Lambert Conformal Conic" to EPSG:4326 and stretch vertically to avoid shape distortion

I am trying to convert "Lambert Conformal Conic" into "map-like" representation (which is EPSG:4326 as far as I understood), so I used gdalwarp -t_srs EPSG:4326 -of GTiff /tmp/src....
0 votes
0 answers
58 views

Reprojecting (warp) raster changed the values of the reprojected raster QGIS

The reprojection of a raster containing slope data from CRS:4326 to CRS:25830 resulted in a change in raster values. When I add the reprojected raster over the original one and use the identify ...
  • 343
0 votes
1 answer
115 views

gdal_edit not find as internal command in Python

I am writing the geoinformation using the gdal_edit command using python in Jupyter notebook. Below is the syntax. !gdal_edit -a_ullr -1.149576 85.247405 -92.762859 88.022318 -a_srs "+proj=...
1 vote
1 answer
24 views

Does GDAL 3.x/PROJ 7.x do some kind of bounds checking when doing a gdalwarp operation?

This is more of a question about how GDAL 3.x and PROJ 7.x work more than a question about how to do something. I have been experimenting with GDAL 3.4.2 and have noticed some things that are ...
  • 431
0 votes
1 answer
45 views

ERROR 1: Too many points (441 out of 441) failed to transform when using gdalwarp to convert raster with compound projection

If I use gdalwarp to convert a simple ArcInfo ASCII grid with a compound projection (Geographic horizontal/meters vertical) to a GeoTIFF, I get an error message. Here's the input raster (asc_h84deg_vm....
  • 431
0 votes
0 answers
35 views

Georeferencing with gdal_translate and gdalwarp fails

I have been struggling with the georeference plugin in QGIS 3.24 Tisler in Ubuntu (and also in Windows, although it doesn't crash on the latter); first I thought it was my dataset but then tried to ...
  • 3,344
1 vote
1 answer
76 views

GDAL Warp Using QGIS from AK_IFR to EPSG:4326 looks odd

I am using QGIS for converting tiff from AK_IFR to EPSG:4326 (CRS), but in QGIS tiff looking perfect but while exporting it looks like this Source Image Details: FAA IFR Chart Extent -3738773....
0 votes
1 answer
71 views

gdal.Warp - set env var

I set up an ubuntu 18.04 EC2 through AWS that "On Start" will run a python script in which will download a .tif from an s3 bucket and project it from EPSG:4326 to EPSG:3857 using gdal.Warp()....
  • 1,057
0 votes
0 answers
55 views

gdalwarp - ERROR 2: gdalwarpoperation.cpp, 2401: cannot allocate 839889004 bytes on QGIS 3.16

I have two Int16 DEMs of 129600x64800 cells that cover the entire globe. The projection is WGS84 [EPSG:4326]. One contains only the elevation above sea level (no data cells above oceans), and the ...
  • 197
0 votes
0 answers
75 views

Cropping tile map into raster using QGIS

I want to create a layer background for my data map. I am using a WMTS layer or a mbtile file (layer B), it could be an OpenStreetMap. My plan is to merge this layer with a data layout which has holes ...
  • 819
1 vote
0 answers
182 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
119 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: ...
  • 101
0 votes
1 answer
50 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 ...
  • 127
1 vote
1 answer
36 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 ...
  • 113
0 votes
0 answers
20 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
62 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 -...
  • 1,537
0 votes
1 answer
124 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 ...
  • 419
1 vote
1 answer
41 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
89 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
32 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 ...
  • 651
0 votes
1 answer
140 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 ...
  • 1,041

1
2 3 4 5
15