[GRASS-user] error in t.rast.accdetect

Veronica Andreo veroandreo at gmail.com
Thu Apr 27 11:52:29 PDT 2017


Hello Soeren,

Thanks for your answer.

Just to be sure, I removed the strds and maps, and checked that they were
also unregistered from the temporal database. After that, I tested again
with the t.rast.accdetect: I get the same error.

However, just before you answered I was writing and sent an update with
some further details I observed. I would really appreciate any help
I do not understand what's happenning :-/

Thanks again,
Vero

2017-04-27 20:22 GMT+02:00 Sören Gebbert <soerengebbert at googlemail.com>:

> Hi,
> is there already a map with the id "eip2_2003_08_01 at lst" registered in
> the temporal database? The module does not check for existent maps and
> simply assumes that the ids are unique.
>
> Ciao
> Sören
>
> 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/ef7f653d/attachment.html>


More information about the grass-user mailing list