Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
1  
Have you checked both files with gdalsrsinfo? I had similar issues when using EPSG:900913 instead of EPSG:3857. –  Andre Joost May 31 '13 at 11:09
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.