[Gdal-dev] gdal_merge invalid literal for int(): -3.40282e+038

Frank Warmerdam warmerdam at pobox.com
Thu Jan 26 18:41:17 EST 2006


On 1/26/06, Matt Wilkie <matt.wilkie at gov.yk.ca> wrote:
> Hi, I'm trying to use gdal_merge to mosiack some dems, but how do I get
> it to ignore a float32 nodata number?
>
> gdlainfo says "NoData Value=-3.40282e+038" but when I try and use it
> gdal_merge pukes:
>
> gdal_merge -o d:\scratch\merged.tif dem1 dem2 -n -3.40282e+038
>
> Traceback (most recent call last):
>    File "c:\local\fwtools\bin\gdal_merge.py", line 362, in ?
>      nodata = int(argv[i])
> ValueError: invalid literal for int(): -3.40282e+038

Matt,

Please change the above line to "nodata = float(argv[i])"
and see if that works better.

I have committed this change in CVS.

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list