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'm trying to crop some old georeferenced cartography in order to have a continuous map (every map has its blank borders that overlaps).
Usign raster->extract->clipper and setting no value to -32768 as the original maps, I got the same message:

for band 1, destination nodata value has been clamped to 0, the original value being out of range.

the problem is all the blacks in the map are translated to nodata. If I set no data value to something greater than 255, it clamps to 255 and all the whites are hidden. Is there a way to fix that?
the commandline is like that:

gdalwarp -dstnodata -32768 -q -cutline "borders.shp" -crop_to_cutline -of GTiff "source.tif" "destination.tif"
share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Solved by simply checking "create output aplha band".
The reason of the message is because gdalwarp uses the byte type by default, so only 8bits are allowed for every pixel (values from 0 to 255).
you can use the -of Int16 option to extend the ranges, but it will increase the size of the raster and shift the colors (I suppose it's because of the resampling).

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.