Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to clip raster data with GDAL (in fact I am using QGis, which produces me a command line for GDAL) The raster has been transfored to EPSG:3857, which is also the projection of the shape file which contains the boundaries.

gdalwarp -dstnodata 0 -q -cutline D:\GIS\data\cutline_shape.shp 
 -crop_to_cutline -of GTiff D:\GIS\data\raster_3857.tif D:/GIS/data/clipped_raster.tif

The clipping processes without error, but the GDAL clips a wrong portion of the raster, it has the correct shape but is about 20 km to the north of the shape file.

Best regards D3

share|improve this question
Have you checked both files with gdalsrsinfo? I had similar issues when using EPSG:900913 instead of EPSG:3857. – AndreJ May 31 '13 at 11:09
up vote 0 down vote accepted

if I do not reproject the raster data (it is in EPSG:31468 - DHDN / Gauss-Kruger zone 4) and do the clipping based on vector data with the same projection, the clipping works fine.

share|improve this answer

You can try reprojecting the raster data but to EPSG:102113 instead, don't use 3857.

This post may help: Reprojecting WGS 1984 Web Mercator (EPSG:3857) in Python with GDAL

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.