[GRASS-dev] GSoC 2018 report week 04 - GRASS GIS module for Sentinel-2 cloud and shadow detection
wenzeslaus at gmail.com
Mon Jun 11 09:04:25 PDT 2018
On Mon, Jun 11, 2018 at 11:13 AM, Roberta Fagandini <robifagandini at gmail.com
> 2018-06-11 10:29 GMT+02:00 Moritz Lennert <mlennert at club.worldonline.be>:
>> - The code for reading this file can probably be simplified
>> quite easily by using something like this:
>> for line in file(input_file):
>> a = line.split('=')
>> if len(a) <> 2 or a not in ['blue', 'red', etc ]:
>> gscript.fatal("Syntax error in the txt file.")
>> a = a.strip()
>> bands[a] = a
> Thank you! this is a better solution than mine. It was a first experiment
> but I have already implemented your suggestion.
Please note that: In Python 2 "The forms <> and != are equivalent; for
consistency with C, != is preferred; where != is mentioned below <> is also
accepted. The <> spelling is considered obsolescent." In Python 3, there is
no <>, only !=.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-dev