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

Veronica Andreo veroandreo at gmail.com
Thu Apr 27 10:22:29 PDT 2017

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):
line 592, in <module>
ERROR: Unable to execute transaction:
INSERT INTO raster_base ( name ,creator ,mapset     ,creation_timemain()

,temporal_type ,id   File
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
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
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
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) ;
line 1020, in execute_transaction
    return self.connections[mapset].execute_transaction(statement)
line 1314, in execute_transaction
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170427/1bb7cc98/attachment.html>

More information about the grass-user mailing list