grass-svn2git / grass-issues-test

0 stars 0 forks source link

Add rename and delete of Location and Mapset in Datacatalog #33

Open grass-svn2git opened 5 years ago

grass-svn2git commented 5 years ago

Reported by @wenzeslaus on 6 Jun 2018 21:47 UTC Add ''Rename'' and ''Delete'' actions to the context menu of Location and Mapset tree items in the Datacatalog (''Data'' tab).

Current items (7.4) in the context menu of Mapset:

Location does not have any associated actions.

Migrated-From: https://trac.osgeo.org/grass/ticket/3577

grass-svn2git commented 5 years ago

Comment by @NikosAlexandris on 6 Jun 2018 22:29 UTC For Mapsets, does this mean that there will be a g.remove mapset option? Or a g.mapset -r? 'r' as in remove. And, correspondingly, a way to rename?

grass-svn2git commented 5 years ago

Comment by @wenzeslaus on 7 Jun 2018 01:27 UTC Probably not g.remove mapset because mapset is (at least currently) not considered to be an element (''element of a mapset'' to be exact) like raster or vector maps.

g.mapset -r is difficult to decide. It looks like it makes sense, but on the other hand, in GRASS GIS, you are not allowed to edit data in other mapsets. Deleting other mapset seems to qualify as editing data in other mapset and deleting current mapset does not make much sense.

Nevertheless, now (in the startup) you can do it (you are not really running GRASS yet). It is implemented purely in GUI/Python (AFAIR). It is important for the users who are not using command line and can't use rm /the/full/path/to/mapset or are not confident about the database directory structure to simply navigate there in a file browser and delete it.

Adding rename and delete (of location and mapset) to Datacatalog is an extension of functionality in Startup window and in the Data tab (which is here to be nice towards users without deeper GRASS GIS knowledge or command line knowledge). Another reason for it that the Datacatolog (in a modified) is a candidate for inclusion into the new Startup window. Ideally, the functionality of Datacatalog will be configurable on the code level (so different things can be enabled). There is already runtime configuration, namely unlocking of editing of other mapsets (third button from left - lock which is a toggle).

Thus, I would keep this ticket to be just about the Datacatalog, so if you want to pursue CLI/module-level API for removing mapsets (and locations), please open a new ticket (if it is okay with you). The fact that the functionality is in the GUI is definitively an argument for having it also in the command line (whether it is in a module or in the grass executable).