[GRASS-user] error in t.rast.accdetect
Veronica Andreo
veroandreo at gmail.com
Thu Apr 27 12:13:42 PDT 2017
Great that you found it!
Thanks a lot, Soeren! I'll keep an eye on it to update as soon as it is
available in trunk :)
cheers,
Vero
2017-04-27 21:03 GMT+02:00 Sören Gebbert <soerengebbert at googlemail.com>:
> Hi Vero,
> this seems to be a bug introduced 14 month ago by someone who
> implemented the time suffix. The indicator maps should have added
> "_indicator" to their name to distinguish between occurrence and
> indicator maps. I will fix this in trunk.
>
> Ciao
> Sören
>
> 2017-04-27 20:27 GMT+02:00 Veronica Andreo <veroandreo at gmail.com>:
> > An update:
> >
> > I investigated outputs a bit more... The output maps that are registered
> in
> > the occurrence strds contain the range of values that is described for
> > indicator strds (from 1 to 3), and are in fact generated by something
> like
> > this: if(isnull(eip1_2005_09_28), if(isnull(eip1_2005_09_29), null(), 1),
> > if(isnull(eip1_2005_09_29), null(), 2)) <<-- that seems to be the
> indicator.
> > The occurrence maps that are supposed to store the time in days from the
> > beginning of the cycle, are not there (or they are overwritten at some
> > point, dunno).
> >
> > In summary, the indicator maps are generated and registered in the
> > occurrence strds. The occurrence maps are not created (or they are
> > overwritten, dunno) and indicator strds is empty.
> >
> > My question would however, if the output are two strds, wouldn't we need
> to
> > provide two basenames??
> >
> > best,
> > Vero
> >
> > 2017-04-27 19:22 GMT+02:00 Veronica Andreo <veroandreo at gmail.com>:
> >>
> >> Hello list,
> >>
> >> I have accumulated a daily time series of temperatures with BEDD method
> by
> >> means of t.rast.accumulate, and now, I need to identify where do the
> cycles
> >> occur and how much do they last. However, when I run t.rast.accdetect,
> all
> >> goes fine until I get this error:
> >>
> >> Traceback (most recent call last):
> >> File
> >> "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-
> linux-gnu/scripts/t.rast.accdetect",
> >> line 592, in <module>
> >> ERROR: Unable to execute transaction:
> >> INSERT INTO raster_base ( name ,creator ,mapset ,creation_timemain()
> >>
> >> ,temporal_type ,id File
> >> "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-
> linux-gnu/scripts/t.rast.accdetect",
> >> line 437, in main
> >> ) VALUES ('eip2_2003_08_01' ,'veroandreo' ,'lst'
> >> ,'2017-04-27 18:55:42.175407' ,'absolute' ,'eip2_2003_08_01 at lst') ;
> >> INSERT INTO raster_absolute_time ( start_time ,id ,end_time ) VALUES
> >> ('2003-08-01 00:00:00' ,'eip2_2003_08_01 at lst' ,'2003-08-02 00:00:00') ;
> >> INSERT register_null, empty_maps, dbif)
> >> INTO File
> >> "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-
> linux-gnu/scripts/t.rast.accdetect",
> >> line 479, in create_strds_register_maps
> >> raster_spatial_extent ( north ,bottom ,west ,top ,proj ,east
> >> ,id ,south ) VALUES (2428000.000000 ,0.000000 ,4821000.000000 ,0.000000
> >> ,'XY' ,6309000.000000 ,'eip2_2003_08_01 at lst' ,1312000.000000) ;
> >> INSERT INTO raster_metadata (map.insert(dbif)
> >> max File
> >> "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-
> linux-gnu/etc/python/grass/temporal/abstract_map_dataset.py",
> >> line 283, in insert
> >> ,rows ,min ,datatype ,number_of_cells
> >> ,cols ,ewres ,nsres ,id ) VALUES (3.000000 ,1488 ,1.000000 ,'CELL'
> >> ,1660608
> >> ,1116 return AbstractDataset.insert(self, dbif=dbif,
> execute=execute)
> >> ,1000.000000 File
> >> "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-
> linux-gnu/etc/python/grass/temporal/abstract_dataset.py",
> >> line 403, in insert
> >> ,1000.000000 ,'eip2_2003_08_01 at lst') ;
> >> INSERT INTO raster_stds_register ( id ,registered_stds ) VALUES
> >> ('eip2_2003_08_01 at lst' ,NULL) ;
> >> dbif.execute_transaction(statement)
> >> File
> >> "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-
> linux-gnu/etc/python/grass/temporal/core.py",
> >> line 1020, in execute_transaction
> >> return self.connections[mapset].execute_transaction(statement)
> >> File
> >> "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-
> linux-gnu/etc/python/grass/temporal/core.py",
> >> line 1314, in execute_transaction
> >> self.cursor.executescript(statement)
> >> sqlite3.IntegrityError: UNIQUE constraint failed: raster_base.id
> >>
> >> I have no clue of what is wrong... Here are the commands I'm using (I'm
> >> following the example in t.rast.accumulate manual page)
> >>
> >> # accumulation
> >> t.rast.accumulate -n input=reconstructed_lst output=daily_bedd \
> >> start="2003-04-01" stop="2005-09-30" \
> >> cycle="6 months" offset="6 months" granularity="1 day" \
> >> basename=daily_bedd suffix=gran method=bedd limits=14,32 \
> >> scale=0.02 shift=-273.15 --o
> >>
> >> # detect cycle 1:
> >> t.rast.accdetect input=daily_bedd \
> >> occurrence=occurrence_eip1 start="2003-04-01" stop="2005-09-30" \
> >> cycle="6 months" offset="6 months" range=109,218 \
> >> basename=eip1 indicator=indicator_eip1
> >>
> >> The maps are created (basename=eip1) and they contain data, the
> occurrence
> >> strds is also created and contains the eip1 maps, but the indicator
> strds is
> >> empty. And this one (the indicator strds) is the one needed to identify
> >> where do the target cycles occur.
> >>
> >> I would really appreciate any help and advice... please :)
> >>
> >> Thanks much
> >> Vero
> >
> >
> >
> > _______________________________________________
> > grass-user mailing list
> > grass-user at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170427/caf2d346/attachment.html>
More information about the grass-user
mailing list