[GRASS-user] Duplicate STR data sets

damien me at dallen.co
Fri Dec 19 06:20:07 PST 2014


Hello,

I'm new to the temporal functions in GRASS and have only been using v7.1 for
a couple weeks. I use the python interface and I'm trying to create STRDS
for use with g.gui.tplot and  g.gui.animation. I want to create an STRDS
over a specified time range for a number of spectral indices. The only
problem I run into is that I get duplicate STRDS for each index. For
example:

test_ndvi
test_ndvi
test_ndwi
test_ndwi
test_ci
test_ci
test_msavi2
test_msavi2

This means that I am prompted to select which of the duplicates I want to
use. While workable, it's frustrating and I'd like help in figuring out the
cause. I have attached the relevant code below:

    ds_name = options['strds_name']
    map_indices = ['ndvi', 'ndwi', 'ci', 'msavi2']

    ...

    for ind in map_indices:
        dates_str = ''
        grass.run_command('t.create', output = ds_name + '_' + ind, title =
ds_name + ' (' + ind + ')',
                          description = str(sel_dates[0]) + ' - ' +
str(sel_dates[-1]),
                          semantictype = 'mean', overwrite = True)

        for d in sel_dates:
            dates_str += (map_base + d + '_' + ind + ',')

        dates_str = dates_str[:-1]

        grass.run_command('t.register', input = ds_name + '_' + ind, maps =
dates_str, overwrite = True)


Any help or ideas will be much appreciated.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Duplicate-STR-data-sets-tp5178557.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list