#3575: Associate database/location/mapset with workspace file
-------------------------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 8.0.0
Component: Startup | Version: unspecified
Keywords: workspace, location, wxGUI, | CPU: Unspecified
startup, save, load |
Platform: All |
-------------------------------------------------+-------------------------
Save the database/location/mapset in a workspace file. When workspace is
loaded, it should switch it to the given database/location/mapset as with
''Settings > GRASS working environment > ...''
Before the switch, it should check if the mapset dir exist and if it is a
mapset. When that fails (data moved, using different computer, ...), offer
user option to not change workspace (a "Cancel" button) or open the
workspace without the change of mapset (the current behavior) or let user
provide the right database/location/mapset.
Additionally, upon loading, we could check if the layers in Layer Manager
exist. (But that might be solved in some other way in GUI - this
information is currently not conveniently accesible - only when adding a
layer and rendering.
When switch was not successful, the GUI in `glm_in_workspace.diff` asks:
"Do you want to proceed with opening the workspace anyway?" with answers
Yes or No. No is the same as closing the dialog.
With the current (7.4) behavior, you could open the same workspace in
multiple locations and load it successfully as long as the map names (and
mapset names) were the same. Now this is only possible when you delete the
session element. I used that feature once and I don't think it will be
missed that much, but let me know.
Problems (related, but not unique to this, but they just might be of
greater importance):
* #3631
* History goes to different mapset without a warning (same behavior as
''Settings > GRASS working environment > ...'')
In [changeset:"73348" 73348]:
{{{
#!CommitTicketReference repository="" revision="73348"
wxGUI: save database, location and mapset to workspace and switch it when
opening it (closes #3575)
It is no longer possible to just open workspace in a different mapset
than the one where it was saved. However, when session element is not
present (deleted or older gxw file) no mapset switching is performed.
Older versions of GRASS GIS simply ignore the session element.
An error message is given when mapset does not exist and options to
proceed or not are given with some details (can be improved by
diagnostics from grass.py if moved to library).
}}}