[gdal-dev] gdalwarp -srcnodata "0 0 0" -dstnodata "0 0 1" error when running within linux/fwtools via a Java application

Frank Warmerdam warmerdam at pobox.com
Mon Mar 3 10:13:02 EST 2008


John Mitchell wrote:
> We have recently done some testing with image processing on a Linux Server
> using FWTools 2.0.1. All of the gdal commands work from within our
> application which is basically a Java App which goes through and makes
> several system calls. However when we run gdalwarp, in particular -srcnodata
> "0 0 0" -dstnodata "0 0 1", the command line interprets one of the zeros as
> an argument for another switch. Here is the error we get:
> 
> 
> 
> ERROR>ERROR 4: `0' does not exist in the file system,
> 
> ERROR>and is not recognised as a supported dataset name.
> 
> 
> 
> We have tried using quotes, not using quotes, single quotes, double quotes
> and double of both. Every time we get the same error.
> 
> 
> Note: When we run gdalwarp -srcnodata "0 0 0" -dstnodata "0 0 1" etc. from
> the command window it works fine, and also on windows/fwtools within the
> same Java Application.
> 
> 
> Is their any other character besides double quotes that you can use for
> -srcnodata "0 0 0" and -dstnodata "0 0 1" within gdalwarp?

John,

I would suggest using single quotes.  On linux these also hold together a
single commandline argument and they generally are more easily preserved
through transformations than double quotes.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list