wxGUI/datacatalog : Add STDS in datacatalog#7608
Conversation
ninsbl
left a comment
There was a problem hiding this comment.
Good start. Please see my initial feedback below...
| stds_name = self.selected_stds[0].data["name"] | ||
| mapset_name = self.selected_mapset[0].data["name"] | ||
|
|
||
| cmd = ["t.info", f"type={stds_type}", f"input={stds_name}@{mapset_name}"] |
There was a problem hiding this comment.
You have most of the metadata already from t.list with JSON output. So repeated calls to t.info are probably not needed if you can store the metadata (if feasible)?
There was a problem hiding this comment.
Yes, But I prefer using t.info on-demand to keep memory usage light and avoid writing a custom formatter, especially since the TGIS import overhead is resolved. @petrasovaa what do you suggest?
There was a problem hiding this comment.
Memory is not an issue here I would expect, so without measured numbers, I say don't worry about it. Formatting may or may not be a concern.
| "strds": MetaIcon(img="mapset").GetBitmap(bmpsize), | ||
| "stvds": MetaIcon(img="mapset").GetBitmap(bmpsize), | ||
| "str3ds": MetaIcon(img="mapset").GetBitmap(bmpsize), |
There was a problem hiding this comment.
As discussed, there are unfortunately no ready icons to use. Here is an example for a temporal raster icon in QGIS:
https://github.com/qgis/QGIS/blob/master/images/themes/default/mIconTemporalRaster.svg
For background: a common icon theme for OSGeo projects was developed almost 20 years ago oriented on the Tango Desktop theme. See: http://robert.szczepanek.pl/icons.php
The QGIS icon is a good start but would need to be acompanied by vector and raster3d variants. Would you be willing to create such icons? Not sure if it would be feasible to give the raster an impression of a series?
There was a problem hiding this comment.
The advantage of using the clock is that it's easy to recognize, but I think of temporal data in GRASS more in dates and not hours. But symbol of calendar would not be very recognizable in that size. Stacking would be difficult for 3D rasters. Perhaps an image of a timeline? But maybe we can start with the clock since that is the easiest.
There was a problem hiding this comment.
I tried using the clock on the PNG icons. For STRDS and STR3DS, it seems to look okay, but STVDS doesn't look good. You can see this in the screen recording I added to the PR description. Also, I wasn't able to find clear PNG versions of the icons, so I used the ones already available in the repository.
There was a problem hiding this comment.
Icons come from https://github.com/Cracert/GIS-icons, or at least derived from there. We might make svg ones at some point
- Added _popupMenuMultipleStds for multiple temporal dataset selections - Added 'Register maps' and 'Unregister maps' STDS options - Added 'Duplicate dataset', 'Rename dataset', and 'Delete dataset' options - Added 'Merge datasets' option for multiple STDS selections - Optimized t.connect background checks to prevent unnecessary scanning across all mapsets
…oss-mapset support - Add active mapset locks for --ui dialogs (Create STDS/Register/Unregister) - Enable cross-mapset execution for native background tasks (Rename/Delete) - Implement safe JSON parsing for g.mapsets search path check for Merge STDS option
|
As discussed, some screenshots or the like would be very helpful also for others to better grasp the changes in the UI... |
| self.selected_mapset[i].data["name"], | ||
| ) | ||
|
|
||
| removed, cmd = self._runCommand( |
There was a problem hiding this comment.
There are 2 types, only removing the dataset but keeping the data, or removing dataset including the data. I am not sure what is the more common case (complete removal?) but the question should clearly communicate that.
|
It's not working for me, I think the problem is with the recent changes in t.list. If you don't have temporal connection in PERMANENT, t.list doesn't list anything in other mapsets. |
This should most probably handle both issues. |
|
Having a context menu entry to plot the timeline (https://grass.osgeo.org/grass-stable/manuals/g.gui.timeline.html) of one ore more selected STDS would be a useful UI component IMHO, what do you think? |
|
Also modifying metadata (https://grass.osgeo.org/grass-stable/manuals/t.support.html) would make sense to me. |
|
Just a thought on icons: we could already start preparing Data Catalog for region integration here (#7614), specifically by creating subnodes for type groups. For the STDS dataset subnode, we could use either a plain clock icon or a plain timeline icon as suggested by @petrasovaa. The specific STDS items underneath could then use the standard vector and raster icons. |
- Removed options: Removed the 'Duplicate dataset' option and removed the standalone 'Display map(s)' method. - Updated map ID structuring: Upgraded t.*.list queries to fetch id,name natively and store the map_id. This ensures that maps registered in an STDS from other mapsets maintain their correct paths for basic functions. - Expanded STDS context menu: Added 'Plot timeline' (g.gui.timeline) and 'Modify metadata' (t.support) to the primary Space Time Dataset context menu. - Standardized map actions: Added a 'Copy name' option to STDS maps and fixed edge cases for 'Display layer' and 'Show metadata' by utilizing the new map_id fallback and safely creating cross-mapset environments. - Created a dedicated context menu (_popupMenuStdsMap) specifically for maps inside an STDS. This prevents users from accidentally triggering standard spatial tools (g.rename / g.remove) that desync the temporal SQLite database. - Added temporary UI icons: Replaced duplicate mapset placeholders with temporary STRDS, STVDS, and STR3DS icons in the Data Catalog treeview.
|
Hi @saket0187 , I have been testing your code locally on my linux machine. I fetched your fork and branch and built from a clean state. Unfortunately, the data catalog never loads and the progress indicator just keeps spinning. Could you please report load times for the data catalog on your machine (together with a rough estimate of the number of proects, mapsets, and maps)? I do not have that many maps in my current dev-project: But the other projects do not contain that much more either... I do see some critical wx / gtk messages in the console: But I am not sure if they are related.... This is the system I have right now: ./configure --without-pdal My version of wxpython is 4.2.2 and Python is 3.13.13. I can update elements if there is indication that it could fix some of the issues. Anyway, it would be great if you could investigate... I alos tested on Windows Subsystem for Linux (WSL), but there the GUI justs starts and crashes (which may be due to WSL limitations, though other GUI applications do work there). |
|
The gui can work on wsl, but I just wouldn’t consider resolution or visual theme weirdnesses as grass bugs. But it does work enough to see something |
On my Mac, the whole GUI launches completely in about ~3-4 seconds. For context on the scale I am testing with, my database has: g.list mapset='*' type=all | wc -l
1142Python 3.14.6 |
Yes, I can confirm that the GUI start and runs on WSL without issues on current main. On this branch it now does start, but it is unstable. I could open the GUI and see some STDS in the data catalog, but the GUI eventually freezes completely. |
This is currently a draft PR for #861.
At the moment, I have implemented the initial Data Catalog integration, added several context menu options, and listed STDS items.
Features added
Current State
Please refer to the video below to see the current state of the PR.
Demo Link - https://drive.google.com/file/d/1LRaPAz6YeEohQXCW6z2DZzOP1jsCky7C/view?usp=share_link
Known Issues
Important
Notes
Note
Cc: @ninsbl , @petrasovaa