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

Matt Wilkie matt.wilkie at gov.yk.ca
Thu Feb 9 14:53:05 EST 2006


Matt Wilkie wrote:
>>> 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.
> 
> That works perfectly, thanks Frank!

Correction: I'm afraid there is still a bug. The fix specified above 
stops the error message, but the nodata values are not ignored.

Doesn't work:

gdal_merge -o merged.tif -n -3.40282e+038 etc...

Does work:

gdal_merge -o merged.tif -n -340282346638528860000000000000000000000.000 
etc...


-- 
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------




More information about the Gdal-dev mailing list