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.

0
votes
0answers
6 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
27 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
12 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
12 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
19 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
15 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
20 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
29 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
39 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
94 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
32 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
26 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
37 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
39 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
29 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
29 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
50 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
28 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
29 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
60 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
37 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
24 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
38 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
42 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
42 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
83 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
92 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
49 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
52 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
26 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
29 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
106 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
74 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
204 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
39 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:...
2
votes
3answers
456 views

Clipping GeoTIFF with shapefile?

I have a GeoTIFF file and a shapefile. I want to clip the GeoTIFF file using the polygons defined in the shapefile in such a way that it produces a separate output for each polygon (which is different ...
1
vote
1answer
157 views

Error using QGIS 3.2.2 Warp (Reproject) tool with custom coordinate system

I'm using the QGIS Warp (Reproject) tool to reproject a raster from WGS84 to a Lambert Conformal Conic custom projection in QGIS 3.2.2. The call to the GDAL/OGR console is the following: gdalwarp -...
0
votes
1answer
145 views

gdalinfo and other applications not running through Anaconda Prompt

I am using GDAL 2.0.3(installed through wheel) in Anaconda 4.2.0 with Python 3.5 installed. I am able to import GDAL in my code. But whenever I am trying to run gdalinfo and other applications(such ...
0
votes
1answer
58 views

GDAL - Unable to convert to Web Mercator using gdalwarp

I am making geoTIFs of weather data (for a Mapbox overlay) and I am converting them to web mercator for use on the map. The images were generated from the same source file and both images have the ...
1
vote
1answer
171 views

Efficient downsampling with GDAL?

I have a 350go GeoTIFF file with DEM data for the entire world. (a mix of SRTM, EUDEM, etc. ...) This TIFF file is tiled with a block size of 256*256. I would like to downsample this file to a lower ...
1
vote
0answers
118 views

reprojection and write grib files

I'm working on GRIB file, In input, I have the file with data from 0 to 360°. As gdalwarp does not write GRIB file (only gdal_translate), I use gdal warp to projct data from [0,360] & [-90;90] to ...
1
vote
1answer
53 views

Why doesn't QGIS georeferencer support gdal scripting for projective transformation?

I am georeferencing drone images with QGIS, and the transformation method that gives the best results is the projective one. As I have many images, I would like to write a gdal script to automate the ...
2
votes
1answer
70 views

GDAL processing of GRIB2 raster prints hundreds of unsuppressable warnings

I am processing some GRIB2 raster files from NCEP (weather model stuff). An example file would be: http://nomads.ncep.noaa.gov/pub/data/nccf/com/hiresw/prod/href.20180906/ensprod/href.t00z.conus.mean....
1
vote
1answer
36 views

gdalwarp: differentiate between empty-in-source and outside-of-cutline?

I'm using gdalwarp to clip a polygon out of a map layer using --crop_to_cutline. The original map layer has a lot of empty pixels (well, transparent / alpha=0, to be precise). As it stands, my output ...
1
vote
1answer
57 views

Very large VRT file generated by gdal after cutline

In Python, I generate a virtual raster using gdal warp with a cutline as per below gdal.Warp(warpedFilePath, ds, format = 'VRT', cutlineDSName = csvFilePath, srcNodata = 0, dstAlpha = True, ...
1
vote
0answers
32 views

Creating polar-stereographic projection of HDF data subset?

I have an HDF4 file. I would like to create a geotif file containing a polar-stereographic projection of one of the HDF4 data sets. I've tried using gdalwarp. This works for some projection types, ...
2
votes
1answer
102 views

GDAL reprojection 4326 to 3857 creates gap

I have an EPSG:4326 tif covering the world that I need to reproject to EPSG:3857 in order to use it with Mapnik to create a map. When displaying the original tif and leaving Mapnik doing the ...
0
votes
0answers
60 views

gdal.Warp workingType option default

I have been using gdal.Warp() in Python 3.6 for some time now and have just noticed the workingType option (see here for gdal.WarpOptions()). From its definition: workingType --- working type (...
0
votes
0answers
41 views

remove white outline artefacts after gdalwarp/gdal2tiles

I am struggling with the similar problem as described here but with some differences: every raster I project twice using GDALWarp - into their initial projection (raster + .tfw) and then to EPSG:3857 (...