Skip to content

Commit

Permalink
flag for deletion intermediates vector maps
Browse files Browse the repository at this point in the history
  • Loading branch information
pesekon2 committed Jul 31, 2017
1 parent c3960cc commit ed75568
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions r.in.sos/r.in.sos.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
#% description: Print informations in shell script style
#% guisection: SOS description
#%end
#%flag
#% key: f
#% description: Force deletion of created intermediates vector maps
#%end
#%option
#% key: url
#% type: string
Expand Down Expand Up @@ -155,7 +159,7 @@ def main():
service = SensorObservationService(options['url'],
version=options['version'])

if any(flags.itervalues()):
if any(flags.itervalues()) and flags['f'] is False:
get_description(service)

if options['offering'] == '' or options['output'] == '':
Expand Down Expand Up @@ -320,7 +324,9 @@ def create_maps(parsed_obs, offering):
run_command('v.to.rast', input=tableName, output=tableName,
use='attr', attribute_column='value')

# TODO: Delete vector maps if not needed
if flags['f'] is True:
run_command('g.remove', 'f', type='vector',
name=tableName)


if __name__ == "__main__":
Expand Down

0 comments on commit ed75568

Please sign in to comment.