Stack Exchange Network

Stack Exchange network consists of 174 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

3
votes
1answer
17 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
14 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
0answers
15 views

GDAL API - Reproject GRIB2 file without writing intermediate file to disk

I'm trying to reproject grib2 file and as seen in this post it is possible with gdalwarp/gdal_translate command-line tools. I was hoping that with GDAL API I would be able to skip step of writing ...
0
votes
0answers
9 views

Batch Script for Reprojecting Raster Images with World File

Can someone help me to create a routine for converting a batch of folders and their contents? They are ortho aerial rasters, in TIFF format. With TFW files. Tiled and single. I'd like to be able to ...
0
votes
1answer
16 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
44 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
37 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
72 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
20 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
119 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
74 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
40 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
36 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
72 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
39 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
35 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
27 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....
0
votes
0answers
64 views

GDAL interpolation ignores edges with nodata vals

I have a grib file with weather data in 0.25-degree resolution and I want to upsample its higher resolution. I used gdalwarp: gdalwarp -t_srs EPSG:3857 -of GTiff -wo SOURCE_EXTRA=1000 -wm 2000 --...
1
vote
1answer
25 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
47 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
18 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
59 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
28 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
27 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 (...
0
votes
1answer
24 views

GDALReprojectImage (C++) quiet

I am using the GDALReprojectImage method from gdalwarper.h. Is there a way to suppress the output? The function has GDALWarpOptions * psOptions as an input but there in no quiet option. I have seen ...
0
votes
1answer
109 views

Extracted GeoJSON from TIFF

If there are a way to do call("gdal_contour -i 10 -f GeoJSON".split(' ') + [file1, file2]) as Python call method of some library? Not via command line call and intermediate file storing?
1
vote
1answer
47 views

gdal_translate and gdalwarp do not close when converting an ecw file to GeoTIFF

I'm trying to convert a portion of a fairly large ECW file to a GeoTIFF using either gdal_translate or gdalwarp. The problem I'm having is that the GeoTIFF is generated but gdal_translate and ...
1
vote
0answers
47 views

gdal: WMTS is working with 256x256 tiles, but not with @2x (512x512) tiles

I'm working on using imagery from a web map tile service which I've cached locally as a gdal dataset. I have both 256x256 tiles and 512x512 tiles; the latter are the "retina" versions of the former; i....
0
votes
0answers
17 views

rasterio.warp.reporject: works incorrectly on big regions?

I want to reproject a big region of territory to ortho projection. For example, I take a raster of whole Earth in longlat projection and reproject it to ortho (make a view of whole Earth in ortho ...
0
votes
1answer
39 views

Using gdalwarp to merge bands into a mosaic created by gdal_merge?

I have created a mosaic with gdal_merge.py using the following command: gdal_merge.py -createonly -separate -co PHOTOMETRIC=RGB -o merged.tif LE07_L1TP_046030_20180810_20180810_01_RT_b3.tif ...
2
votes
0answers
122 views

gdal_warp with huge tif: integer overflow

I retrieved the SRTM 1" data and merged it in one huge tif. Now I want to warp it. It's working fine for low resolution (eg 5000, 1000, 500), but it doesn't for 90m resolution. I'm using this command: ...
0
votes
2answers
38 views

gdalwarp not clipping to index grid

I am using the 4 corners of a grid to clip a raster to it with gdalwarp with the following code: pkdumpogr -i index.shp -n left1 -n bottom1 -n right1 -n top1| while read Block_ID left1 bottom1 right1 ...
0
votes
1answer
18 views

gdalwarp for clipping images using multiple polygon in a bash shell for loop

C:\OSGeo4W64\bin\gdalwarp.exe -dstnodata 0 -q -cutline D:\hillsborough_Images_work\split_Polygon\120-140k\Hillborough_FINAL_140000_region_IGD_120570003d29ed0dc.shp -crop_to_cutline -dstalpha -tr 0....
0
votes
0answers
38 views

gdal: apply orthorectification to ogr dataset

I'm trying to process Digital Globe L2A image with gdal utilities (e. g. this one: https://www.digitalglobe.com/resources/product-samples/washington-dc-usa) I am using SRTM digital elevation model to ...
0
votes
0answers
23 views

What transformation is used for EPSG 28409 in GDAL?

I used gdalwarp to convert a raster file in EPSG:4326 to one EPSG:28409 I believe that using this method doesn't apply a full transformation as there is no option to select between the numerous ...
0
votes
0answers
52 views

Output arrays from Rasterio masks of Sentinel-1 prodcuts from the same shapefile are not the same shape

I am masking Sentinel-1 data using rasterio.mask.mask. I had first reprojected all Sentinel-1 products I have downloaded using command line gdalwarp as Sentinel-1 data is georeferenced but no ...
0
votes
0answers
90 views

Raster color after crop image by mask with rasterio

I have stacked 4 bands of Sentinel which have 10 meter of spatial resution. I I did it with command above: command = 'gdal_translate SENTINEL2_L1C:{scene_file_name}.SAFE/' \ 'MTD_MSIL1C....
1
vote
0answers
55 views

Problems with S3 georeferencing using Python-GDAL [closed]

I have to work with many Sentinel 2 and 3 images, with two different algorithms. I have to treat both images separately but only with Python and GDAL. Concerning Sentinel-2 images, I download them on ...
0
votes
0answers
13 views

GDAL WARP where geotif goes from west to east hemisphere [duplicate]

I'm using gdalwarp to reproject an elevation geotif downloaded from http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/srtm_70_22.zip Using the following command gdalwarp -s_srs EPSG:4326 ...
0
votes
1answer
46 views

GDAL-Georefrencing already Georefrenced single band Raster

I am trying to georeference already georeferenced single band raster data using GDAL with four GCP's. Input image is having Coordinate system GCS- WGS1984 (EPSG:4326). Following Command is run on ...
0
votes
1answer
89 views

FAILURE: No target filename specified

Each time I run gdalwarp -te 212051.9319179999874905 214051.9319179999874905 183962.2946890000021085 Quada.tif Clipped.tif I get the following error: FAILURE: No target filename specified. Any ...
0
votes
0answers
21 views

Geo-tagging each pixel within an image using GDAL or Python and creating a jpg

I have a large multi band image, in ENVI format that was taken using an aerial platform. Three files are generated out of that, ENVI file, hdr file and a nav file. The system provides lat/long co-...
-1
votes
1answer
121 views

Gdal Translate Creating Non-Standard File from netCDF

I am trying to convert netCDF file from NASA Ocean Color website such as https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2018001180000.L2_LAC_OC.nc now the file converts fine using the answer to ...
0
votes
0answers
18 views

Workpath for Tiled GeoTIFF Warp and Worldfile

I am attempting to identify a workpath (or script) for warping TIFFs (and TFWs) and saving them out. Have tried diff methods "batch mode" and pointed it to the relevant folder etc. But I just get an ...
0
votes
0answers
19 views

Does GDALWarp not support writing MBTiles? [duplicate]

I'm trying to create MBTiles from GeoTIFF datasets (UTM33 projection). I have tried the following command gdalwarp -of MBTiles -t_srs EPSG:3857 -co "QUALITY=80" tiffs\*.tif dataset.mbtiles The ...
0
votes
0answers
121 views

difference between gdalwarp in gdal and in R

I have got some issues using reprojection tool in R, which I already mentioned it HERE. Also read some topics like this but still have some problems understanding the different outputs from R ...
2
votes
1answer
109 views

Use gdal to set multiband raster values to no data

I need to set a 3 band multiband raster (GeoTIff) where band 1 = 0 AND band 2 = 0 AND band 3 = 0 then this is no data (0,0,0 is No Data). Not OR in each band but AND across the 3 bands. I think it is ...
2
votes
1answer
87 views

Transforming Lambert Conformal Conic to EPSG:3857

I have a map file in a tiff format that is not geo-referenced, but I know the following projection information: +proj=lcc +lon_0=10.856 +lat_0=51.322 +lat_1=42 +lat_2=57 +datum=WGS84. I would like to ...
2
votes
1answer
71 views

Gdal merging every two images

I have two sets of MODIS imagery, changed and re-projected to GEOTIFF: 1.includes the south part of my region (100 images) 2.includes the north part of my region (100 images) I want to merge them into ...
3
votes
0answers
68 views

Match Projection & Extent Using GDAL

I am looking to match both the projection and extent of two separate .tif files. The file I want all other .tif files introduced into raster calculations is as follows: The other raster image covers ...