actinia-core
actinia-core copied to clipboard
Add "tgis" support in actinia for persistent processing and export
At time the directory tgis
is not yet copied:
https://github.com/mundialis/actinia_core/blob/e1510fce08f8d40d5fc048dc7fd81e920ed5ffc3/src/actinia_core/resources/persistent_processing.py#L477
In addition, the support needs to be added also in some other places:
- update of mapset name in tgis sqlite.db in persistent part (see t.upgrade and t.downgrade)
- update mapset name in tgis sqlite.db when creating temporary DB
- add to exporter (separate from raster export)
- e.g. netCDF
- in case, augment also https://grass.osgeo.org/grass-devel/manuals/t.rast.export.html and https://grass.osgeo.org/grass-devel/manuals/t.vect.export.html
For inspiration, see https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json#tag/STRDS-Management
Updating the mapset names in the tgis db is not easy: you have to check the current tgis db connection as defined in the <mapset>/VAR
file, then use custom SQL commands to update the correct table and most probably some views need to be recreated.
Here a dirty hack to change mapset names in tgis/sqlite.db
:
- dump SQLite DB, change mapset names on the fly and save to new dump file
- restore new dump file as a new
tgis/sqlite.db
:
/actinia_core/grassdb/geoharmonizer_aq/PERMANENT/tgis # sqlite3 sqlite.db .dump | sed 's+PERMANENT+mymapset+g' > dumpfile
/actinia_core/grassdb/geoharmonizer_aq/PERMANENT/tgis # cat dumpfile | sqlite3 my_database.sqlite
Parts are done in #233, but t.rast.extract
does not work yet or creating a STRDS from rasters from a previous PC (t.create
+ t.register
) does not work either. For this I have created a new bug ticket in GRASS GIS: https://github.com/OSGeo/grass/issues/1791
A first step for TGIS support has been done in GRASS with https://github.com/OSGeo/grass/pull/1924 to register maps from a different mapset in a stds in the current mapset.
TGIS has been enhanced in GRASS 8.0 to work with maps that are not in the current mapset.
Waiting for a new deployment of actinia for testing.
@metzm please test if it is done or waiting for https://github.com/OSGeo/grass/pull/2448