[GRASS-user] Aggregating daily maps in relative strds per month
Sören Gebbert
soerengebbert at googlemail.com
Tue May 19 01:06:38 PDT 2015
Hi Nikos,
being not able to recreate the temporal database in a mapset after
deleting it is definitely a bug in the temporal framework. I have to
investigate this.
Regarding ghost entries:
You can use "t.list type=rast" to list all raster map layer registered
in the temporal database, with or without STRDS association.
Use the "maps" option of module t.unregister to un-register any kind
of map layers (existing, ghost, non-STRDS association, ...).
Best regards
Soeren
2015-05-19 9:54 GMT+02:00 Nikos Alexandris <nik at nikosalexandris.net>:
> I couldn't find my way out to clean the existing mess I created. I am
> re-doing all from scratch. It was all worth the time spent though.
>
> It there is interest for open questions (of mine), below an error
> message and a question.
>
> Thanks, Nikos
>
>
> Soeren:
>
>> > The tgis directory can be removed, all temporal commands will check if
>> > the mapset specific temporal database exists and will create one if
>> > needed.
>
> Nikos:
>
>> I removed the tgis directory manually (rm -rf). Then issued `t.connect -d` or/and
>> `t.connect -c`. Though this sets the connection driver/path in the VAR
>> file, the '-p' reports as if all is ok, I only receive the error
>>
>> ERROR: Unable to connect to sqlite3 database:
>> /geo/grassdb/ellas/oiti/wgs84_old/PERMANENT/tgis/sqlite.db
>> Exception: "unable to open database file"
>> Please use t.connect to set a read- and writable temporal database
>> backend
>>
>> from any of the t.connect or t.create commands I tried.
>
> + a more detailed message from withing a GRASS session and ipython,
> trying to force tgis.init():
>
> --%<---
> In [3]: %tb
> ---------------------------------------------------------------------------
> SystemExit Traceback (most recent call last)
> <ipython-input-2-9e2cb3184ba5> in <module>()
> ----> 1 tgis.init()
>
> /osgeo/grass70/dist.x86_64-unknown-linux-gnu/etc/python/grass/temporal/core.pyc in init(raise_fatal_error)
> 658 return
> 659
> --> 660 create_temporal_database(dbif)
> 661
> 662 ###############################################################################
>
> /osgeo/grass70/dist.x86_64-unknown-linux-gnu/etc/python/grass/temporal/core.pyc in create_temporal_database(dbif)
> 769 # Connect now to the database
> 770 if not dbif.connected:
> --> 771 dbif.connect()
> 772
> 773 # Execute the SQL statements for sqlite
>
> /osgeo/grass70/dist.x86_64-unknown-linux-gnu/etc/python/grass/temporal/core.pyc in connect(self)
> 878 conn = self.connections[mapset]
> 879 if conn.is_connected() is False:
> --> 880 conn .connect(dbstring)
> 881
> 882 self.connected = True
>
> /osgeo/grass70/dist.x86_64-unknown-linux-gnu/etc/python/grass/temporal/core.pyc in connect(self, dbstring)
> 1077 "temporal database backend") % (
> 1078 {"db": self.dbmi.__name__,
> -> 1079 "string": tgis_database_string, "ex": e, }))
> 1080
> 1081 def close(self):
>
> /osgeo/grass70/dist.x86_64-unknown-linux-gnu/etc/python/grass/pygrass/messages/__init__.pyc in fatal(self, message)
> 269 raise FatalError(message)
> 270 else:
> --> 271 sys.exit(1)
> 272
> 273 def debug(self, level, message):
>
> SystemExit: 1
> --->%--
>
>
>
> Nikos:
>
>> > > 2) although I remove strds-es via t.remove, the command `t.list rast` still
>> > > shows maps which do not exist anymore anywhere. How come?
>
> Soeren:
>
>> > Maps can be registered in several different STDS. Hence removing a
>> > STDS without explicitly removing the registered map layers (forced
>> > with -rf) will only un-register the maps from the specific STDS but
>> > not from the temporal database.
>> > Use t.unregister to simply un-register map layers from the temporal
>> > database (and all associated STDS) or use the -rf option in t.remove
>> > to fully remove map layers from the temporal and spatial database. The
>> > module g.remove will not delete the time stamps from the temporal
>> > database, since only temporal commands are aware of it. The module
>> > t.support allows to check STDS for removed or overwritten map layers
>> > to update the temporal database accordingly.
>
> What happens if ones removes the strds using t.remove without '-rf' or/and no
> t.support -m was executed. And, additionally, removes a series of (previously)
> registered maps as well using g.remove? It seems that this results in ghost entries
> in the t-db (?).
>
> t.unregister will not work if the maps and the strds don't exist, right?
> t.remove -rf
>
> Nikos
More information about the grass-user
mailing list