New answers tagged gdalwarp
For the Mercator projection, the extent can not reach North and South pole for mathematical reasons. The standard Google and Openstreetmap mercator projection is limited to 85.011° North and South to get a square map. See http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#X_and_Y for explanation. Using EPSG:3857, the extent of a map is ...
I'd recommend removing the old GDAL completely. As an alternative, just remove the binaries that cause problems (probably from /usr/local/bin with something like sudo rm /usr/local/bin/gdal_translate. If you need to use both versions, you can probably set LD_LIBRARY_PATH to select particular library variants and use explicit paths to the binary you want. ...
Drop the brackets around the first argument to subprocess.call. It's designed to take either a the command string as a single argument, or as a list of arguments that will be separated by a space. Here you are supplying the whole argument in one, so give it as a string, not a list.
Make sure that raster file and shapefile have the same CRS. The raster should be a tif, with georeference stored inside, and the shapefile must be a polygon. Make sure that the extent of the raster and shapefile fit together. The CRS should be suitable, e.g. it should not include the poles when using a mercator projection, and no part should be on the back ...
Top 50 recent answers are included