Skip to content

Commit

Permalink
column as a parameter for t.vect.to.rast
Browse files Browse the repository at this point in the history
  • Loading branch information
pesekon2 committed Aug 16, 2017
1 parent 5e32304 commit c5e285b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions t.vect.to.rast/t.vect.to.rast.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def rasterize(options, vectorMaps, stampedMaps, dbif, overwrite):
if mtimMap.get_id().split('@')[0] == ':'.join([map, layer]):
extent = mtimMap.get_temporal_extent()
mapName = '{}_{}'.format(options['basename'],
extent.get_start_time())
extent.get_start_time())
if ':' in mapName:
mapName = '_'.join(mapName.split(':'))
if '-' in mapName:
Expand All @@ -137,9 +137,14 @@ def rasterize(options, vectorMaps, stampedMaps, dbif, overwrite):
dbif=dbif,
overwrite=overwrite)

run_command('v.to.rast', input=map, layer=layer, use='attr',
attribute_column='value', output=newMap.get_id(),
quiet=True, overwrite=overwrite)
run_command('v.to.rast',
input=map,
layer=layer,
use='attr',
attribute_column=options['column'],
output=newMap.get_id(),
quiet=True,
overwrite=overwrite)

rasterMaps.append(newMap)

Expand Down

0 comments on commit c5e285b

Please sign in to comment.