All Questions
528
questions
44
votes
5
answers
16k
views
Reprojecting raster from 0 360 to -180 180 with cutting 180 meridian using gdalwarp
I have a geotiff raster image that has a coordinate system with longitudes from 0 to 360.
The horizontal center of the image is 180 longitude. See image below:
I want to transform it to EPSG:4326 SRS ...
40
votes
3
answers
49k
views
gdalwarp cutline along with shapefile
I am trying to clip my Raster file according to a shapefile geometry. I am using the following code
gdalwarp -cutline INPUT.shp INPUT.tif OUTPUT.tif
But it is resulting a black color outside the ...
24
votes
1
answer
11k
views
File size inflation normal with gdalwarp?
After using gdalwarp to project and align-to-grid (via -tap) a number of rasters I noticed that the output rasters were significantly larger than the original rasters. A fairly thorough web search ...
20
votes
1
answer
16k
views
Replicating result of gdalwarp using gdal Python bindings
I am trying to re-project/resample with the GDAL python bindings, but am getting slightly different results compared to those from the command line utility gdalwarp.
See update below for shorter ...
17
votes
3
answers
18k
views
What's the difference between gdalwarp and gdal_merge for mosaicing
I wanted to merge around 20 dem tiffs each around 100MB, and I used gdalwarp (I know about virtual file option):
gdalwarp $(list_of_tiffs) merged.tiff
However this command took very long time, and ...
17
votes
4
answers
19k
views
Gdal: clipping a raster with another raster
I'm writing a simple utility to crop batches of multi-band geotiff raster files to the same (smaller) area. Using gdalwarp, I can easily crop a file using a single-polygon clipping shapefile:
...
17
votes
1
answer
22k
views
Georeferencing raster using GDAL and Python?
I want to georeference a raster using python and GDAL. My current approach is to call gdal_translate and gdalwarp using os.system and an ugly list of ground control points. I'd really like a way to do ...
16
votes
2
answers
7k
views
Clip raster by shapefile in parts?
I am trying to write .sh script command to clip raster by polygonal shapefile. Shapefile have name field with unique name of polygon feature. On the output must be rasters with name of polygons in ...
13
votes
2
answers
2k
views
Can I preserve a fading alpha layer when mosaicing images with gdal?
I am mosaicing some images with gdal and would like to improve the final result by using a fading / gradual alpha layer towards the edge of each image to remove the sharp edges in the middle of the ...
12
votes
1
answer
8k
views
how can 2 geotiff rasters be aligned and forced to have same resolution in python using gdal?
I have 2 raster files of different resolution (having different pixel size and origin, but both files are georeferenced). I want to align the 2 files so that each pixel of first raster coincides with ...
12
votes
1
answer
2k
views
PyQGIS save raster as rendered image, then use GDAL tools on it
I have tried to use the code from QGis Save Raster as Rendered Image. i is a raster layer:
pipelayer = i
pipeextent = pipelayer.extent()
pipewidth, pipeheight = (pipelayer.width(),
...
11
votes
1
answer
6k
views
Difference between gdalwarp and projectRaster
I am trying to project a Raster. In R there is the projectRaster() function to to this (below a fully reproducibly example) :
# example Raster
require(raster)
r <- raster(xmn=-110, xmx=-90, ymn=40,...
10
votes
4
answers
9k
views
For looping folder to batch clip rasters by polygon using python and QGIS?
I am using Python and QGIS 2.0.
I am trying to clip rasters in a folder by one polygon feature.
It's the first time for me using PyQGIS; I was used to ArcPy before.
How do I get my script to work?
...
10
votes
2
answers
15k
views
How to use gdal2tiles on a custom tiff image recieved from providers to generate tiles
I have been struggling a bit to generate tiles for a high-resolution image that we have. The current image we have is a very large (+20GB) image, saved as a GeoTiff file.
I would like to generate ...
10
votes
1
answer
5k
views
Solving Gdalwarp error 'too many points failed to transform' for remapping Geostationary to Lambert conformal [closed]
I am trying to remap from Geostationary to Lambert conformal using gdalwarp. My input data is in netcdf, and is in geographic coordinates (degrees) and I would like to output the remapped data to ...