Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gdalwarp]

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

1
vote
1answer
9 views

Trying to make a calculation with gdal_calc.py | GDAL

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 ...
0
votes
0answers
8 views

Reproject Sinusoidal Big Raster to EPSG 4396

Today reproject MODIS Sinudoidal to EPSG 4396, in my older GDAL and Qgis 2.14 easy. But today no understand why not and sending this bugs!! david@dummy13:/mosaiced_tiles$ gdalwarp -s_srs "+proj=sinu +...
1
vote
1answer
25 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 ...
2
votes
0answers
39 views

Saving osgeo.gdal.Dataset as GeoTIFF or JPEG with world files using GDAL from Python?

I am trying to take a plain JPEG with no spatial references, apply ground control points (GCPs) to it, and output a georeferenced GeoTIFF or JPEG with world files. I found some code that seemed like ...
0
votes
0answers
12 views

gdal_warp cannot specify target extents

This is related to this previous post. As was trying to implement the said answer and inserting it to my code, but the code doesn't seem to work. #importing all the necessary modules import os, ...
0
votes
1answer
32 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
1answer
77 views

Using GDALwarp for reprojecting netCDF file?

I am trying to re-project a netCDF file using the gdalwarp command. However, the gdalwarp is giving me a black output. Below is my code: import gdal import osr import netCDF4 from osgeo.gdalconst ...
0
votes
0answers
28 views

gdalwarp : I lose some pixels when I crop

My problem: When I crop with gdal gdalwarp -te minX minY maxX maxY input_raster.tif output_raster.tif I expect an output shape of (maxX - minX, maxY - minY) = (10980,10980) BUT : I get an output ...
1
vote
0answers
44 views

Why gdal does not find gcps coordinates on SENTINEL images?

I use gdalwarp with python to overlay polygons on ENVISAT radar images. Everything goes well for this type of images but when I try with SENTINEL images, gdal does not find the georeferencing. It ...
1
vote
1answer
32 views

gdalbuiltvrt output is different than the source images, when using dstalpha?

I have warped some images from various state plane coordinate to EPSG 3857, but the output of gdalbuildvrt is messed up (see image). I've tried dozens of different combinations of gdalwarped and ...
0
votes
1answer
16 views

CGIAR DEM + gdalwarp — projection to Cartesian is not happening

I have downloaded a 30-by-30 tile from http://srtm.csi.cgiar.org/srtmdata/ Then gdalinfo on the obtained single *.tif-file would yield Driver: GTiff/GeoTIFF Files: cut_n30e000.tif ...
1
vote
1answer
26 views

UTM Projection of DEM-data with gdalwarp

I have downloaded a certain tile from https://www.eorc.jaxa.jp/ALOS/en/aw3d30/data/index.htm, and after the requisite logistics (unzipping, putting all *.AVE_DSM.tif files into a single folder), I ...
0
votes
1answer
38 views

Gdal.warp broken in version 2.3.3?

I have two versions of Python gdal running in different environments. One is slightly older (2.1.1) and gdal.Warp seems to work just fine there, the newer version doesn't. Has anyone else had this ...
2
votes
1answer
38 views

GDALwarp HDF5 Image With Unknown Projection

I have a NetCDF file that contains a series of HDF5 bands. I am looking to project one of these bands contained within this file. I've attempted to use the following command to achieve this: gdalwarp ...
0
votes
0answers
18 views

GDALWARP ERROR 6: Only single band dataset supported for non Byte datatype

I'm trying to cut an image using GDALWARP and I have the error: ERROR 6: Only single band dataset supported for non Byte datatype I think my image is of a single band and data type Float32. The result ...
1
vote
1answer
44 views

How do I transform an EPSG:3857 world map to an EPSG:4326 ECE world map?

This follows up a question posted over seven years ago. The results look very similar to the original inquiry without an answer or update I could test successfully. I made a custom stylized EPSG:3857 ...
0
votes
0answers
25 views

Specifying dimension for variable in NetCDF input file using GDAL?

I have a data which is in .nc format. I want to extract a variable which is in XxYxZ dimensions for example 4032x496x3 inside the netcdf file. But the problem is when using gdal_translate it is ...
0
votes
0answers
13 views

How can I convert MISR(multi-angle image spectro-radiometer) level 2 AOD (MIL2ASAE) swath dataset to grid data

I am able to convert as batch the 'Aerosol_Optical_Depth' data set inside MISR(multi-angle image spectro-radiometer) level 2 (MIL2ASAE) swath data to grid data,which is in .nc format, and in 2 ...
0
votes
0answers
48 views

GDALWarp and Target Aligned Pixels Not Effective

I have two sets of TIFFs of different resolutions (100m and 1000m), different alignment, and varying data types with corresponding no data values. I need to downsample the 100m TIFFs to match the ...
0
votes
0answers
27 views

Matching Mollweide extent?

I'm trying to match two rasters to same size, so i can do cell to cell analysis on them. The first cell That I'm trying to match is in Mollweide projection, with 250 m resolution. Here is the gdalinfo ...
1
vote
0answers
31 views

Split raster to many irregular polygons [closed]

I'm splitting a national soils raster file into regional (county) rasters, and organizing the soils classifications into a database keyed by region, eventually plot- or farm-level detail. At the ...
2
votes
1answer
31 views

gdalwarp - correct for a slight spatial misregistration?

Some Sentinel-2B band images have slight spatial misalignments as I explained on the step forum. https://forum.step.esa.int/t/sentinel-2-tci-10m-level-2-images-slight-spatial-misregistrations/14235 ...
2
votes
1answer
53 views

sampling error using gdalwarp on a subsetted VRT?

I am currently trying to prepare an SRTM subset including height conversion from EGM96 to WGS84 using gdalwarp. I encountered some strange shifts in part of the image. Here is a reproducible example: ...
1
vote
1answer
183 views

GDAL and reprojecting a NetCDF file

I have a .nc file that you can download here. This is satellite imagery. I want to re-project this and save it to a new .nc file, without saving to raster. Just NetCDF to NetCDF only. Is this ...
-1
votes
1answer
44 views

Python gdal.Warp doesn't create a file

I would like my code to write a tiff file from GRIB while changing the resolution. So I take file1 (GRIB fmt) and translate it to tiff. The file appears in the folder. Then, I make a warp, but no ...
1
vote
0answers
50 views

Gdal raster translate and wrap

I am trying wrap my raster with GCP control points using gdal_translate and gdalwrap tools. I've read at gdal mailing list about wrap with affine transformation, so I thought it is easy to done using ...
1
vote
0answers
46 views

Project a subset of GeoTIFF image from UTM 32651 to EPSG:4326 by bounding box in EPSG:4326?

I have a GeoTIFF file which is in UTM 32651 and I need to develop a program, using GDAL library version 1.x (e.g., not using gdalwarp/gdal_translate binary tools) which takes a subset bounding box in ...
1
vote
0answers
26 views

gdalwarp looses pixel information

I have an ungeoreferenced .tif of which I know the spatial information. However, when I run the following command it looses all unique values. All pixels have the value 32, which is the upperleft ...
0
votes
0answers
51 views

[Resolved) Resampling ALOS images with Python

I'm trying to resample an ALOS image of 12.5 m resolution to 1 m resolution with cubic interpolation using GDAL warp. Here is the current code used in pyzo import os from os import path import ...
0
votes
0answers
33 views

No transformation when applying gdal.warp

I am trying to convert a GeoTiff resolution and projection by applying gdal.warp. Unfortunately, there is no change on the output. > transformation = gdal.Warp('/vsimem/transfotest.tif'.encode('...
0
votes
0answers
57 views

gdal2tiles (or some steps before) produces erroneous tiles from a mosaic TIFF

I have for some days now tried to create a image pyramid from a set of around 1400 TIFF files with no luck. I can't get my head around what is the cause of the problem. I will try to explain as good ...
1
vote
1answer
52 views

Resampling two raster files

I have two rasters, one for road network and another one for the DEM of the country. I have to overlay the road network raster on top of DEM raster so as to get the elevation of roads. But my rasters ...
2
votes
0answers
44 views

Is there a GDAL function similar to OpenCV's WarpPerspective?

I't trying to mosaic a GeoTiff raster against another. Initially, they were both georeferenced in WGS-84 CRS. Using OpenCV, I calculated a homography transformation (a 3x3 projection matrix), that ...
2
votes
0answers
47 views

gdal_translate does not crop the GeoTIFF file [closed]

When I use gdal_translate to crop the GeoTiff file, the output file is saving the same as the input file. Nothing changed. The size needs to decrease at the boundaries I specify. What can I do? from ...
2
votes
1answer
64 views

How to set correct geo information on pleiades images with RPC model?

Now I have pleiades raster (img.tif) and a RPC model (rpc.XML). In the rpc.XML, there are the following lines which can be used to reset geo information. <RFM_Validity> <...
1
vote
1answer
53 views

Using GDAL to strip nodata in border regions only?

I am trying to create a script that given a tiff file with islands of data (which can be disjoint) and black pixels of nodata, can generate polygons (or new tiffs) that only wrap around the islands of ...
0
votes
0answers
29 views

Gdalwarp producing odd results around 0 degree longitude

I am warping ECMWF grib data (full globe, 0.25 degree resolution) to match the SEVIRI geostationary satellite projection. I use this command: gdalwarp -overwrite -ot Float32 -t_srs "+proj=geos +a=...
2
votes
1answer
41 views

Python Fiona affecting external GDAL binaries?

Curious if anyone else has encountered this before and may have an explanation: In my Python workflow, I'm importing fiona (1.8.4) to manipulate shapefiles, and then later downstream I'm shelling out ...
1
vote
1answer
45 views

GDALWARP cuts off right edge of image?

I'm reprojecting GFS GRIB files to EPSG:3857 using gdalwarp. Resulting file get little bit shorter to the right so when I zoom in from zoom level 5 and higher, I can see vertical line with missing ...
1
vote
1answer
56 views

GDAL crop ECW file with coordinates

I am looking to crop an ECW image based on latitude and longitude. I have the following code to do that but it doesn't work. <gdalwarp -t_srs EPSG:27700 -te 51.50386 51.50391 -0.4333941 -0.4333865 ...
1
vote
2answers
133 views

Reproject MODIS data using R (results in NAs or no spatial extent)

I am using GLASS albedo data stored here for pre-2000 (AVHRR) data and here for post-2000 data (MODIS). My end goal is to create a raster stack of each month that contains white sky albedo data from ...
0
votes
1answer
93 views

Clip to mask layer not adhering to expected width and height following CRM and resolution changes

I am attempting to take a simple opentopo heightmap and carry out the following in QGIS 3.4.1 - Reproject to UTM 31N - Set cell size resolution to 5mtr - Clip to a shapefile polygon feature exactly ...
1
vote
0answers
73 views

GeoTIFF to KMZ using gdal_translate produce imagery with bad colors

I have a TIFF file which is georeferenced in UTM coordinates. So as a first step, I convert the UTM TIFF into a WGS84 TIFF using gdalwarp. On the next step, I used gdal_translate to convert a TIFF ...
3
votes
1answer
68 views

gdal.Warp() returns different results on 2.1.0 and 2.3.2

I upgraded GDAL version from 2.1.0 to 2.3.2. Both versions I built from source with Python bindings. PROJ version - 5.2.0. Expected behavior gdal.Warp() returns the same result as in 2.1.0 Actual ...
1
vote
0answers
30 views

Setting both spatial extent and resolution when using gdalwarp?

I would like to overlay two tiff image that orginally have different projections. One is MODIS sinusoidal and the other one is WGS84. I use gdalwarp to re-project the latter into the same projection ...
0
votes
1answer
34 views

gdal.Warp cutline creates empty file when run on the server, but works perfectly fine through Python command line

Trying to cut geotif with a shp file. When I open Python command line interpreter and run from osgeo import gdal gdal.Warp(outfile, infile,format='GTiff', cutlineDSName=shpfile, srcSRS='EPSG:4326',...
2
votes
0answers
180 views

Using max as resampling method with gdal_translate?

My Issue According to the docs it appears that gdalwarp has many more resampling methods than gdal_translate. Can anybody explain why the resampling methods can't be used with both functions? ...
3
votes
0answers
92 views

Why can't I transpose a raster across the pole with rasterio or gdal, and how could it be done?

I have a raster in e.g epsg:4326, it covers all world, from 180E to 180W, from 90S to 90N. I want to re-project a part of it to epsg:3031 and also change the grid size and resolution. Here is a ...
1
vote
1answer
296 views

Using gdalwarp with c# bindings?

I want to change projections for images using gdal bindings for c#. Gdal_translate seems like just renaming of projection (using a_srs parameter), but not reprojecting, so I used gdalwarp with s_srs ...
1
vote
1answer
55 views

Feeding gdalwarp with binary data instead of ascii, how to specify header information

I have a working pipeline where I download a tar.gz file which contains multiple binary files in the german RADOLAN format (Translate PNG obtained through RADOLAN from DWD's projection to EPSG:...