GSoC 2020: GRASS GIS startup mechanism
Title: | Creation of a new GRASS GIS startup mechanism |
Student Name: | Linda Kladivova |
Organization: | OSGeo - Open Source Geospatial Foundation |
Mentor Name: | Anna Petrasova, Martin Landa, Vaclav Petras, Moritz Lennert |
GSoC proposal: | View proposal |
GitHub Repository: | view repository |
Abstract
This project will focus on the creation of a more user-friendly GRASS GIS startup. The general idea is to make the initial user’s contact easier and with a less steep learning curve. While programming new GRASS startup GUI several tasks will be solved – changes in Location wizard structure, Data Catalog as well as general GUI.
Goal
GRASS GIS comes with the concept of Location and Mapset which is not going to be replaced because of its advantages such as organized structure. The goal of this project is to make this concept more user-friendly (especially in terms of the welcome screen). The motion is that the Data Catalog will be expanded so that in addition to raster and vector data, it can manage even Locations and Mapsets. Then this widget could be used in the welcome screen. The work schedule below has been compiled on the basis of the Roadmap available here: https://trac.osgeo.org/grass/wiki/wxGUIDevelopment/New_Startup#PragueRoadmap.
To sum up the schedule: From June 1st to June 28th (4 weeks), I plan to work on the Location wizard (the topic for the first evaluation), from June 29th to July 19th (3 weeks) I plan to program the new form of the Data Catalog (the topic for the second evaluation). From July 20th to August 23rd I will work on creating the new welcome page itself by integrating the improved components.
Timeline
Time Period | Milestones | |
---|---|---|
Tasks | Status | |
May 4 - June 1 |
|
Ok |
June 1 - June 7 | Location wizard - first page
|
|
June 8 - June 14 | Location wizard - EPSG page - (see https://github.com/OSGeo/grass/pull/670):
|
|
June 15 - June 21 | Location wizard
|
Ok
|
June 22 - June 28 | Finishing the implementation of Location wizard
|
|
June 29 - July 5 | Data catalog:
|
First evaluation
|
July 6 - July 12 | Data catalog:
|
|
July 13 - July 19 | Data catalog
|
OK
|
July 20 - July 26 | Data Catalog:
|
|
July 27 - August 2 | Data Catalog:
|
|
August 3 - August 9 | Data Catalog:
|
|
August 10 - August 16 | Data Catalog:
|
|
August 17 - August 23 | Finishing up, testing, documentation
|
|
August 24 - August 31 | Finalizing the existing work Submitting the final work | TBD |
Bonding period report
Introduce myself in dev list, get in contact with my mentors and discuss the design of functions
After being accepted as a student for GSoC 2020, I introduced myself to grass dev lists on May 13. Also, I got in contact with my mentors - Martin Landa, Anna Petrasova, Vaclav Petras and Moritz Lennert. On May 14 we set up the video call where we discussed how to set up my GRASS dev environment and how to proceed with future work.
Prepare the wiki page about the project
I created my project wiki page (2) and added the link to the GSoC 2018 Accepted proposals page (3). The wiki page includes - General information about the project (title, mentors, links to the proposal and GitHub repository, etc.), a brief description of the project, goal, and timeline of tasks and deliverables.
I will keep my wiki page up to date and will add weekly reports following the instructions in the GSoC Recommendations for Student page (4).
Set up the GitHub repository of the project
I have chosen GitHub (5) as a public repository for the development of this project. I added the link to the GSoC 2020 Accepted proposals page (3), to my wiki page (2) and I shared it with my mentors. My repository is licensed under the GNU General Public License v3.0, according to the license of GRASS GIS.
Set up a developer environment
I checked and updated my developer environment so as to be ready to start coding after the bonding period.
Four PR already created
I created two PR related to the First Page of Location Wizard: https://github.com/OSGeo/grass/pull/493 and https://github.com/OSGeo/grass/pull/646. Both of them are already closed. In those PR the layout of this page was changed quite significantly. The database directory was mentioned as the last attribute and can be changed. The Location Name was marked as required. Location Title was renamed as Description and marked as optional (also in the Summary Page this was renamed). Both checkboxes "Set default region and resolution" and "Create user mapset" were removed.
I also created a single PR related to removing the picture of the world: https://github.com/OSGeo/grass/pull/657 which is still open and made one improvement related to automatic detection of case-independent cases of grassdata directory that is not literally mentioned in the roadmap: https://github.com/OSGeo/grass/pull/664 (issue: https://github.com/OSGeo/grass/issues/644.)
(1) https://lists.osgeo.org/pipermail/grass-dev/2018-April/088262.html
(2) https://trac.osgeo.org/grass/wiki/GSoC/2020/StartupWindow
(3) https://wiki.osgeo.org/wiki/Google_Summer_of_Code_2020_Accepted
(4) https://wiki.osgeo.org/wiki/Google_Summer_of_Code_Recommendations_for_Students
(5) https://github.com/lindakladivova/grass
Weekly reports
Week 1
1) What did I complete this week?
I created a single PR related to the bigger topic related to changes in EPSG page (see https://github.com/OSGeo/grass/pull/670). I made a change in layout definition. Now it is defined by boxSizer instead of gridBagSizer. Also, path to usr/share/proj/epsg was removed. Search and EPSG code text inputs were merged into one search input. An informative link to epsg.io was added.
Removing the picture of the world: https://github.com/OSGeo/grass/pull/657 was already merged into master. Similarly, I am already done with the automatic detection of case-independent cases of grassdata directory: https://github.com/OSGeo/grass/pull/664 (issue: https://github.com/OSGeo/grass/issues/644.)
2) What am I going to achieve for next week?
Next week I am going to continue on PR regarding the EPSG page (see https://github.com/OSGeo/grass/pull/670). The layout is done, now I am gonna focus on events. There are several requirements:
- searching in a list on the fly
- choose automatically the first row and permit "next" button
- if epsg code is empty, nothing is selected and "next" button is not active
- change informative URL according to a query string
Furthermore, I am gonna work on improvement when GRASS should create a grassdata directory in the default path for its platform automatically (see https://github.com/OSGeo/grass/issues/682).
3) Is there any blocking issue?
No, it isn't.
Week 2
1) What did I complete this week?
I focused mainly on completing the PR (see https://github.com/OSGeo/grass/pull/670) regarding the EPSG page. New things that are already incorporated:
- remove path to "/usr/share/proj/epsg"
- merge search and EPSG code text inputs
- searching in a list on the fly
- if epsg code is empty, nothing is selected and "next" button is not active
- change informative URL according to a query string (link to epsg.io)
Other two PRs were established:
- Startup GUI automatic detection of grassdata: make case independent (see https://github.com/OSGeo/grass/pull/664, see https://github.com/OSGeo/grass/issues/644). Detects a grassdata directory if present, but it does not detect GRASSDATA, Grassdata, or any other possible combinations of cases. It should be independent to allow for different cultures of case usage in file and directory naming.
- Create grassdata automatically on the first GUI startup (see https://github.com/OSGeo/grass/pull/705, see https://github.com/OSGeo/grass/issues/682)
After starting GRASS GIS with GUI, the GUI now searches for existing grassdata. If nothing is found, GRASS GIS (GUI) should automatically create directory named grassdata as a subdirectory of a platfrom-dependent directory. This platfrom-dependent directory would be:
- $HOME (os.path.expanduser('~')) on Linux and the like,
- User's Documents on Windows (see dac6d4a for code trying to identify that dir),
- One of the above on macOS - macOS users, please share your ideas.
- If that fails, it should use a temporary directory (/tmp/... etc.) as a fallback.
Those PRs are still in progress.
2) What am I going to achieve for next week?
I would definitely work on finishing PRs see https://github.com/OSGeo/grass/pull/664 and https://github.com/OSGeo/grass/pull/705. Then I will continue in work on Location Wizard particularly Projection page and Final Page. The labels in some pages will be also probably somehow changed, so far it was not addressed.
3) Is there any blocking issue?
No, it isn't.
Week 3
1) What did I complete this week?
I have worked and completed two PRs related to Startup page:
- Startup GUI automatic detection of grassdata: make case independent (see https://github.com/OSGeo/grass/pull/664, see https://github.com/OSGeo/grass/issues/644). Detects a grassdata directory if present, but it does not detect GRASSDATA, Grassdata, or any other possible combinations of cases. It should be independent to allow for different cultures of case usage in file and directory naming.
- Create grassdata automatically on the first GUI startup (see https://github.com/OSGeo/grass/pull/705, see https://github.com/OSGeo/grass/issues/682)
I have also set up and work on the new PR related to CRS selection page (see https://github.com/OSGeo/grass/pull/721, see https://github.com/OSGeo/grass/issues/706). I am almost done with this PR.
2) What am I going to achieve for next week?
I would end up the last PR related to Location Wizard (see https://github.com/OSGeo/grass/pull/721) and also start to work on other issues related mainly to the Data Catalog:
- Correct "list index out of range" error in the Console tab in GUI after right-click on the database directory ("grassdata") node (root) in the Data tab (see https://github.com/OSGeo/grass/issues/709)
- Add, rename and delete of Location and Mapset in Data catalog (see https://github.com/OSGeo/grass/issues/710)
- Distinguish mapsets by ownership and lock (see https://github.com/OSGeo/grass/issues/714)
- Add New Mapset action to the Data catalog (see https://github.com/OSGeo/grass/issues/717)
3) Is there any blocking issue?
I am sorry for not doing much work earlier this week, I was away one week from home till this Wednesday. Now, for the last three days, I have been trying to catch it up and next week I will work harder. :)
I do not have any blocking issues.
Week 4
1) What did I complete this week?
I finalized my work regarding the Location Wizard:
- Editing of CRS selection page where WKT is using pasted text instead of search mechanism (see https://github.com/OSGeo/grass/pull/721, see https://github.com/OSGeo/grass/issues/706)
- Correction of errors according to flake 8 and addition of some description (see https://github.com/OSGeo/grass/pull/728)
I have also started to work on other issues related mainly to the Data Catalog:
- Correction of "list index out of range" error appears in the Console tab in GUI after right click on the database directory ("grassdata") node (root) in the Data tab (see https://github.com/OSGeo/grass/pull/736, see https://github.com/OSGeo/grass/issues/709, already done)
- Add new mapset action to data catalog (see https://github.com/OSGeo/grass/pull/731, see https://github.com/OSGeo/grass/issues/717)
- created GenericMultiValidator in gui_core/widgets, which will work as GenericValidator, but can pass tuple of conditions and callbacks,
- defined callbacks (_nameValidaionFailed, the ogr check and also test whether the mapset already exists) inside the NewMapsetDialog class,
- created simple function in guiutils to check if mapset exists.
2) What am I going to achieve for next week?
I would finalize on the PR Add new mapset action to data catalog (see https://github.com/OSGeo/grass/pull/731, see https://github.com/OSGeo/grass/issues/717):
- adjusting the code in gis_set.py to accommodate the new changes,
- creation of new function in datacatalog/tree called insertMapset for inserting a mapset into a virtual tree,
- adjusting the code in gis_set.py and tree.py to accommodate the new changes.
I would also start to work on other issues related mainly to the Data Catalog:
- Add, rename and delete of Location and Mapset in Data catalog (see https://github.com/OSGeo/grass/issues/710)
- Distinguish mapsets by ownership and lock (see https://github.com/OSGeo/grass/issues/714)
3) Is there any blocking issue?
I do not have any blocking issues.
Week 5
1) What did I complete this week?
I ended up adding of the new mapset action to the data catalog (see https://github.com/OSGeo/grass/pull/731, see https://github.com/OSGeo/grass/issues/717):
- adjusting the code in gis_set.py to accommodate the new changes,
- creation of new function in datacatalog/tree called insertMapset for inserting a mapset into a virtual tree,
- adjusting the code in gis_set.py and tree.py to accommodate the new changes.
I also made two other PR related to Data Catalog. First one makes data tab the default in GUI. The Data tab was moved so it is the first tab from the left and it is the default when the GUI opens. (see https://github.com/OSGeo/grass/pull/756, https://github.com/OSGeo/grass/issues/748). Second one merges LocationMapTree and DataCatalogTree classes (see https://github.com/OSGeo/grass/pull/755, https://github.com/OSGeo/grass/issues/740).
I have also started to work on a bigger issue which allows users to add additional grass databases as currently, only one database is in the GUI data catalog (see https://github.com/OSGeo/grass/pull/761, https://github.com/OSGeo/grass/issues/741). Unfortunately, I made the mistake upon committing into GitHub so now till correction it is also associated with other commits. In this PR I made the toolbar button for adding an existing database and then edited several functions mainly in datacatalog/tree.py that need to handle more than one database. This PR is not finished yet, I am a bit stuck here and need to solve other processing with mentors.
2) What am I going to achieve for next week?
I would finalize on the PR Add multiple GRASS databases (see https://github.com/OSGeo/grass/pull/761, https://github.com/OSGeo/grass/issues/741). I would also start to work on other issues related mainly to the Data Catalog:
- Add, rename and delete of Location and Mapset in Data catalog (see https://github.com/OSGeo/grass/issues/710)
- Add new location action to database node in Data tab (see https://github.com/OSGeo/grass/issues/747)
- Startup screen: Distinguish mapsets by ownership and lock (see https://github.com/OSGeo/grass/issues/714)
3) Is there any blocking issue?
No, it is not.
Week 6
1) What did I complete this week?
I am finalizing the PR Add multiple GRASS databases (see https://github.com/OSGeo/grass/pull/761, https://github.com/OSGeo/grass/issues/741). This PR changes tree.py quite significantly and also adds the new toolbar button for adding the existing GRASS database. Simultaneously, I have finished the bigger PR related to new Rename and Delete actions of Location and Mapset (see https://github.com/OSGeo/grass/pull/771, https://github.com/OSGeo/grass/issues/710).
2) What am I going to achieve for next week?
I would finalize on the PR Add multiple GRASS databases (see https://github.com/OSGeo/grass/pull/761, https://github.com/OSGeo/grass/issues/741). And I would merge the above-mentioned PRs. I would also start to work on other issues related mainly to the Data Catalog:
- Add new location action to database node in Data tab (see https://github.com/OSGeo/grass/issues/747)
- Distinguish label and name of nodes (see https://github.com/OSGeo/grass/issues/780)
- Add functionality to load only data from the current mapset in the Data tree (see https://github.com/OSGeo/grass/issues/749)
- Startup screen: Distinguish mapsets by ownership and lock (see https://github.com/OSGeo/grass/issues/714)
3) Is there any blocking issue?
No, it is not.
Week 7
1) What did I complete this week?
I finalized the PR Add multiple GRASS databases (see https://github.com/OSGeo/grass/pull/761, https://github.com/OSGeo/grass/issues/741). I also made several smaller PRs related to several issues. As we would like distinguish different layers according to lock and ownership in future, it was necessary to distinguish label and name of nodes (see https://github.com/OSGeo/grass/pull/783, https://github.com/OSGeo/grass/issues/780). I also changed the order of Layer Manager tabs and a label "Layers" to "Display" (see https://github.com/OSGeo/grass/pull/802, https://github.com/OSGeo/grass/issues/799). Simultaneously, I am working on bigger PRs related to new actions in Data Catalog. The first one adds Create New Location and Download Location actions to database node in Data tab (see https://github.com/OSGeo/grass/pull/790, https://github.com/OSGeo/grass/issues/747). The second one allows the Delete action on multiple selected mapsets (see https://github.com/OSGeo/grass/pull/795, https://github.com/OSGeo/grass/issues/791).
2) What am I going to achieve for next week?
As the paradigm has quite changed after the community video call on July 15 (startup screen will be probably removed), I will go ahead and add more functions and actions to Data Catalog which is now becoming the center point of the whole management in GRASS. First I am gonna focus on Adding new icons to the data catalog for several actions whose list is still broadening. This is related to the Issue https://github.com/OSGeo/grass/issues/800. There are also other issues related to the Data Catalog I am gonna address:
- Add functionality to load only data from the current mapset in the Data tree (see https://github.com/OSGeo/grass/issues/749)
- Startup screen: Distinguish mapsets by ownership and lock (see https://github.com/OSGeo/grass/issues/714)
- Check for gislock and other issues when deleting/renaming/editing mapset and location in catalog (https://github.com/OSGeo/grass/issues/801)
3) Is there any blocking issue?
No, it is not.
Week 8
1) What did I complete this week?
I ended up a smaller PR repairing Delete action in Data Catalog (see https://github.com/OSGeo/grass/pull/789, https://github.com/OSGeo/grass/issues/788). Then I and my mentors finalized bigger PR related to new actions in Data Catalog. The first one adds Create New Location and Download Location actions to database node in Data tab (see https://github.com/OSGeo/grass/pull/790, https://github.com/OSGeo/grass/issues/747). The second one allows the Delete action on multiple selected mapsets (see https://github.com/OSGeo/grass/pull/795, https://github.com/OSGeo/grass/issues/791). There is also another PR that adds new icons to Data Catalog for actions available in the context menu. Out of those actions Create new mapset was managed (see https://github.com/OSGeo/grass/pull/811, https://github.com/OSGeo/grass/issues/800).
2) What am I going to achieve for next week?
I am gonna work on new icons available in the context menu: download sample location, create new location, import into current mapset. There are also other issues related to the Data Catalog I am gonna address:
- Startup screen: Distinguish mapsets by ownership and lock (see https://github.com/OSGeo/grass/issues/714)
- Check for gislock and other issues when deleting/renaming/editing mapset and location in catalog (https://github.com/OSGeo/grass/issues/801)
3) Is there any blocking issue?
There is no technical stuff, however, I will be four days gone for my holidays (25-28 July). From 29 July I will start to work on GSoC again and do not have any other plans until the end of August.
Week 9
1) What did I complete this week?
I added two icons avaliable in the context menu: download sample location, create new location (see https://github.com/OSGeo/grass/pull/830). Currently I am working on 5 other PRs and unfortunately I am a bit stuck on 3 of them.
- Distinguish mapsets by ownership and lock in Data tab (see https://github.com/OSGeo/grass/issues/714, https://github.com/OSGeo/grass/pull/849)
I set new mapset node properties: lock and user: Our motion is that those mapsets will be displayed in Data Catalog in gray and also distinguished by labels. I have an error which is probably somehow relates to my new keys definition, but do not know how to figure that out.
- Store list of databases in settings (see https://github.com/…842, https://github.com/…858)
Within this PR I made two functions for deleting grassdb from the disk and removing grassdb from the tree. In this PR I also changed a bit checking if wanted grassdb is not already added to Data Catalog. All these functions = adding, removing and deleting grassdb change the wx file so that we can remember which grass databases are in the Data Catalog. Saving grassdatabase string to this file works but I have a problem when I starting GRASS GIS for the second time it falls down because it does not probably like the edited wx file (see errorPR858).
- An action should be required before modifying other mapsets (see https://github.com/…843, https://github.com/…848)
This PR is ready for review. I added checking of current mapsets and location when deleting and renaming. The motion is that when Allow editing mode is ON we are allowed to rename and delete any mapsets and locations except current ones, if OFF no mapset or location can be renamed or deleted.
- Start in a demo/startup location (see https://github.com/…862, https://github.com/…868)
Here I made two functions startup_location_exists which checks for demolocation and copy_startup_location which copy the simple location with some data into GRASS database. I have a problem with testing that.
- Misleading lock symbol icon in the in the Data tab toolbar (see https://github.com/…844, https://github.com/…870)
I am not stuck here but need some feedback if the icons I suggested are good, reasonable or something entirely different is needed.
2) What am I going to achieve for next week?
I am gonna end up those above-mentioned PRs. It was decided that the startup screen is no longer used. It changed quite significantly the next GSoC steps. Now there are several issues related to the Data Catalog I am gonna address. They come from Next steps in GSoC and beyond video call, July 15, 2020 written by Vaclav Petras (see https://trac.osgeo.org/grass/wiki/wxGUIDevelopment/New_Startup#NextstepsinGSoCandbeyondvideocallJuly152020):
- Check for gislock and other issues when deleting/renaming/editing mapset and location in catalog (https://github.com/OSGeo/grass/issues/801)
- Add buttons to add new things: Import into current mapset (also as a context menu item on mapset, see below).
- Add context menu items: Import into mapset (like in File), Export map (like in Layers)
- An icon for creating the new database?
- Deleting more than one location?
3) Is there any blocking issue?
No. It is not.
Week 10
1) What did I complete this week?
First of all, I finished two PRs related to two modes "Allow edits outside of the current mapset" and "Restrict edits to the current mapset". The first PR deals with the implementation of these restrictions (see https://github.com/OSGeo/grass/issues/843, https://github.com/OSGeo/grass/pull/848). The motion is that when Allow editing mode is ON we are allowed to rename and delete outside of the current mapset, if OFF no edits are restricted to the current mapset. The second PR suggested the new symbol since previous one was very misleading (see https://github.com/OSGeo/grass/issues/844, https://github.com/OSGeo/grass/pull/870). Secondly, I implemented storing list of databases in settings (see https://github.com/OSGeo/grass/issues/842, https://github.com/OSGeo/grass/pull/858). Thirdly, I enabled the option of deleting multiple locations (see https://github.com/OSGeo/grass/issues/874, https://github.com/OSGeo/grass/pull/875).
Currently, there are 3 other PRs that are in the process:
- Start in a demo/startup location (see https://github.com/OSGeo/grass/issues/862, https://github.com/OSGeo/grass/pull/868)
This is almost done. However, there will be another PR opened that is gonna treat the initial state of GRASS more systematically.
- Distinguish mapsets by ownership and lock in Data tab (see https://github.com/OSGeo/grass/issues/714, https://github.com/OSGeo/grass/pull/849)
Almost done, just some smaller cosmetic changes. In this PR I also established the mapset key "current". Therefore, not only the locked mapset and the mapset owned by the different owner than the current user, but also the current mapset is distinguished by label.
- Data Catalog: Double click on map from different locations fails - BUG (see https://github.com/OSGeo/grass/issues/884, https://github.com/OSGeo/grass/pull/886)
The initial suggestion was to inform the user that the map is in a different location and ask if they want to switch to this mapset. However, there are probably more ways in the game how to solve this issue (e.g. not allowing to display those maps at all?...) Should be discussed.
2) What am I going to achieve for next week?
I am gonna end up those above-mentioned PRs. Then I will continue with checking for gislock and ownership when performing operations with mapsets and locations. Furthermore, I am gonna reflect changes, I made in Data Catalog, in GUI.
- Check for gislock and other issues when deleting/renaming/editing mapset and location in catalog (see https://github.com/OSGeo/grass/issues/801)
- Reflect changes done from Data Catalog in GUI and vice versa (see https://github.com/OSGeo/grass/issues/885)
- when map is renamed in data catalog while it is displayed, the layer needs to be changed otherwise rendering fails
- when map is moved elsewhere in data catalog while it is displayed
- new map is created (this item needs to be expanded, there are multiple ways a new map is created)
- current mapset/location is changed from menu
- etc.
3) Is there any blocking issue?
No, it is not.
Week 11
1) What did I complete this week?
I finished implementing the very important PR which distinguishes mapsets by ownership and lock (see https://github.com/OSGeo/grass/issues/714, https://github.com/OSGeo/grass/pull/849). I also fixed a bug that appeared when a user wanted to display a map from a different location (see https://github.com/OSGeo/grass/issues/884, https://github.com/OSGeo/grass/pull/886). Eventually, it is not allowed to do that and a user needs to switch a mapset first.
Currently, there are 3 other PRs that are in the process:
- Start in a demo/startup location (see https://github.com/OSGeo/grass/issues/862, https://github.com/OSGeo/grass/pull/868)
This issue was a bit broadened. It consists of not only creating a startup location but also a startup mapset. This PR also gives the option to start up whole GRASS GIS without the startup screen.
- Check for gislock and other issues when deleting/renaming/editing mapset and location in catalog (see https://github.com/OSGeo/grass/issues/801, https://github.com/OSGeo/grass/pull/904)
Almost done, just some smaller cosmetic changes. This PR creates new checking functions that check both mapsets and locations when renaming/deleting.
- Switch to another mapset when in use (aka force remove lock) (see https://github.com/OSGeo/grass/issues/898, https://github.com/OSGeo/grass/pull/906)
Almost done, this issue offers an option to force the removal of the lock and switch to the mapset anyway.
2) What am I going to achieve for next week?
I am gonna end up those above-mentioned PRs. Then, I am gonna reflect changes, I made in Data Catalog, in GUI.
- Reflect changes done from Data Catalog in GUI and vice versa (see https://github.com/OSGeo/grass/issues/885)
- when map is renamed in data catalog while it is displayed, the layer needs to be changed otherwise rendering fails
- when map is moved elsewhere in data catalog while it is displayed
- new map is created (this item needs to be expanded, there are multiple ways a new map is created)
- current mapset/location is changed from menu
- etc.
3) Is there any blocking issue?
No, it is not.
Week 12
1) What did I complete this week?
I finished implementing three very important PRs. Firstly, I aimed at the start in Demo Location (see https://github.com/OSGeo/grass/issues/862, https://github.com/OSGeo/grass/pull/868). Now, when starting GRASS GIS the startup screen can be skipped. It happens in two cases - either when a user is a first-time user (then the Demo Location with startup mapset is offered) or the last used mapset is valid. In those cases, we can directly jump into GRASS GIS particularly to the Data Catalog which is now the core of the whole software. Secondly, I made checking functions that check mapsets, locations and GRASS databases when renaming and deleting (see https://github.com/OSGeo/grass/issues/801, https://github.com/OSGeo/grass/pull/904). It is not allowed to delete current database, location, and mapset, permanent mapset, mapset owned by a different user, or mapset which is "in use". Thirdly, we needed to have an option on how to remove the lock (how to open up mapsets "in use"). When switching to the mapset that is "in use", we can select if we want to stay in the current mapset or switch to selected mapset. So, we can force the removal of the lock and switch to the mapset anyway (see https://github.com/OSGeo/grass/issues/898, https://github.com/OSGeo/grass/pull/906). Furthermore, I corrected the bug when multiple grass databases context menu shows Delete locations (see https://github.com/OSGeo/grass/issues/913, https://github.com/OSGeo/grass/pull/914).
Currently, there are two PRs which are almost done:
- Reflect changes when mapset/location is created from menu (https://github.com/OSGeo/grass/pull/916)
This PR solves the case when mapset/location is created from menu.
- Add direct editing of mapset and location name and editing layer name in other mapsets should be possible even when the restricted mode is on (https://github.com/OSGeo/grass/pull/920, https://github.com/OSGeo/grass/issues/918, https://github.com/OSGeo/grass/issues/917)
Currently, we can rename the map by selecting it and clicking at it again, which opens an editing window (like in any file manager). This should work also for mapsets and locations. It should take into account if the restricted mode is on or off. The second thing is that in Data Catalog when we select a map in other mapset and click on it a second time to open editing window, we can rename it even when the restricted mode is on. This should not be permitted.
2) What am I going to achieve for next week?
I am gonna end up those above-mentioned PRs. Then, I am gonna write the final report that will sum up STATE BEFORE GSoC 2020 and STATE AFTER GSoC 2020. The main part of the work is done, but there are a few things that are still ahead of us. I will mention them in the Final Report.
3) Is there any blocking issue?
No, it is not.
Final Report
Title: Creation of a new GRASS GIS startup mechanism
Community: GRASS GIS - OSGeo
Abstract:
This project focused on the creation of a more user-friendly GRASS GIS startup. The general idea was to make the initial user’s contact easier and with a less steep learning curve. While programming new GRASS startup GUI several tasks were solved – changes in Location wizard structure, Data Catalog as well as general GUI. The initial motion was that the Data Catalog would be only expanded so that in addition to raster and vector data, it can even manage Locations and Mapsets. Eventually, the Data Catalog took over the role of the Startup screen and completely replaced it. After these changes when starting GRASS GIS we are directly redirected to Data Catalog which became the focal point of the whole system.
The state of the art BEFORE the start of GSoC:
Every new GRASS GIS user was always redirected to the Startup screen, where he had to perform several steps (set up a database, location, and mapset). It was quite confusing without knowing what each of these elements actually means. So It can happen that a new potentially satisfied user could give up working with this software right at the beginning (I speak from my own experience). And that's a shame because GRASS GIS offers a lot of great features! Before GSoC, the main role was played by the Startup screen and after somewhat confusing setup the GRASS was launched on the Layers tab. At this point, the Data Catalog only allowed to work with layers and did not allow to manage mapsets and locations. It also does not allow adding more than one database.
The state of the art AFTER GSoC:
First, let's focus on the first important utility, and that is the Location Wizard. This guide for creating a new location has changed quite a lot. The first page has been streamlined and somewhat misleading names of the individual attributes have also been changed. Similarly, the next page, originally named "Choose method for creating a new location", is now much more clearly defined with the new name "Select Coordinate Reference System (CRS)". CRS can be newly specified using WKT string. However, the biggest change has affected the page with the original name "Choose EPSG Code", now "Select CRS from list". This window newly supports dynamic search as well as a hyperlink to EPSG pages which changes dynamically according to the filter set by the user.
The second thing I focused on throughout July and August was the Data Catalog. For this tool, it was necessary to take over all the functionality of the canceled Startup screen. I would like to emphasize here the most important functionalities that were coded. The data catalog now supports the addition of multiple databases. These databases can be deleted from the tree or deleted directly from the disk. The Data Catalog also supports the creation, renaming, and deletion of mapsets and locations. Among other things, it also supports deleting multiple mapsets and locations. Several icons have also been added for easy manipulation. Another important thing that has been addressed is the distinguishing of mapsets. In the Data Catalog, mapsets owned by a different user are now grayed out as well as mapsets that are "in use". These cases were also considered when renaming/deleting, therefore several checks were performed. When switching mapsets, it is possible to remove gislock (make available the mapset which is "in use"). The term gislock is no longer confused with the lock icon in the context menu which allows or restricts editing outside the current mapset and which now has the character of an editing pencil. At this point, I would also like to emphasize the great contribution that Anna Petrasova coded, and that does the differentiation of databases, locations, mapsets, and layers in Data Catalog by icons.
The third thing that has undergone a big change is the very start of GRASS. GRASS GIS no longer uses the Startup screen. The default tab in GUI is now the Data tab which contains the Data Catalog. For the first-time user, GRASS is launched in the Demolocation "world_latlong_wgs84" which should be an example of the correct use of the PERMANENT mapset and other user-created mapsets. If you are not a first-time user, Data Catalog is opened in the last used mapset.
Conclusion:
The main task to create a new starting mechanism has been completed. Features have also been added compared to the original Startup screen, such as deleting mapsets and locations, resolving mapsets by ownership and lock, etc. The Data Catalog can be enhanced with additional features, but the main part where it replaces the Startup screen is done. Similarly, the Location Wizard has been improved and is currently much more user-friendly. A more detailed description of the new functionalities and a comparison using screenshots is contained in a short presentation which will be used for presenting the news to the GRASS community.
Next Steps:
- An important task for the future is to improve the first-time user experience. To do this, we could implement information windows that introduce the first-time user to the next steps. Example: Do you want to create a new location? Etc.
- Although the Demolocation contains maps, they are not displayed in the map window at startup. This should be improved as well.
- Furthermore, it is necessary to focus on the connection of the Layer Manager with the Data Catalog. For example, when creating a location from the Layer Manager, a location should be also loaded in the Data Catalog.
- Due to the fact that the Data Catalog has become the center of the whole system, further development will be focused on the Data Catalog. Its functionality might be extended to work with time series (raster, vector, and raster3d).
Permanent Links:
Pull requests related to the Data Catalog:
Pull requests related to the Location Wizard:
Title | Pull Request | Issue |
Correct errors according to flake 8 and add some description | https://github.com/OSGeo/grass/pull/728 | - |
Improve new location's CRS method selection page | https://github.com/OSGeo/grass/pull/721 | https://github.com/OSGeo/grass/issues/706 |
EPSG page | https://github.com/OSGeo/grass/pull/670 | - |
Map picture removed | https://github.com/OSGeo/grass/pull/657 | - |
First page | https://github.com/OSGeo/grass/pull/646 | - |
First page | https://github.com/OSGeo/grass/pull/493 | - |
Pull requests related to the Startup:
Title | Pull Request | Issue |
Start in a demo/startup location | https://github.com/OSGeo/grass/pull/868 | https://github.com/OSGeo/grass/issues/862 |
Store list of databases in settings | https://github.com/OSGeo/grass/pull/858 | https://github.com/OSGeo/grass/issues/842 |
Changes in Layer Manager tabs order and labels | https://github.com/OSGeo/grass/pull/802 | https://github.com/OSGeo/grass/issues/799 |
Make Data tab the default in GUI | https://github.com/OSGeo/grass/pull/756 | https://github.com/OSGeo/grass/issues/748 |
Create grassdata automatically on the first GUI startup | https://github.com/OSGeo/grass/pull/705 | https://github.com/OSGeo/grass/issues/682 |
Startup GUI automatic detection of grassdata: make case independent | https://github.com/OSGeo/grass/pull/664 | https://github.com/OSGeo/grass/issues/682 |
The project that includes all PRs (not only mine) related to this problematics:
https://github.com/OSGeo/grass/projects/1
Weekly Reports:
https://trac.osgeo.org/grass/wiki/GSoC/2020/StartupWindow
Presentation of new startup GUI in Beamer (Google Drive public folder):
https://drive.google.com/file/d/1dMTAKSW43P3lmIdcSIxRASDomIGxTyJL/view?usp=sharing