I am trying to clip a raster file. When I do so, the following message come up;

ERROR 5: MINUSERPIXELVALUE must be specified.

enter image description here

  • I had the same problem. Try generating the file 2005_TIN with .tif extension instead of .asc extension. It should work – Andrea Ruju Oct 6 '17 at 9:44

Did you try setting the MINUSERPIXELVALUE to a specific value in the gdalwarp code?

See the answer to this post: GDAL - Specify span of elevation values for conversion to Terragen format?

In addition the manpage of gdalwarp indicates the following:

-co 'NAME=VALUE': passes a creation option to the output format driver. Multiple -co options may be listed. See format specific documentation for legal creation options for each format.

So it seems it depends on the raster format you are using (which explains why I never faced this issue).

It seems you should get the MINUSERPIXELVALUE and MAXUSERPIXELVALUE from gdalinfo. Unearthing an old TIN asc file, it seems you can find the min and max value in the layer properties -> Metadata (band). Include them into the gdalwarp code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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