Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f663fee
Draft PR
saket0187 Jun 26, 2026
c180710
Add context menu options
saket0187 Jun 30, 2026
9a6587c
Added STDS & STDS registered maps context menus with UI safety and cr…
saket0187 Jun 30, 2026
58b132e
Merge branch 'main' into Add-stds-in-datacatalog
petrasovaa Jul 1, 2026
67fe213
Don't change mapset search path
saket0187 Jul 1, 2026
4e1c9b6
STDS GUI integration, fix crashes, and update icons
saket0187 Jul 8, 2026
c6478e8
Merge remote-tracking branch 'origin/main' into Add-stds-in-datacatalog
saket0187 Jul 9, 2026
4b9467f
Merge remote-tracking branch 'upstream/main' into Add-stds-in-datacat…
saket0187 Jul 9, 2026
71464fb
Optimize STDS loading in Data Catalog using mapset='*'
saket0187 Jul 9, 2026
83c92c3
Add check for single mapset reload
saket0187 Jul 10, 2026
c1049c9
Improve STDS and map management in Data Catalog
saket0187 Jul 11, 2026
c21eca0
Improve STDS menu actions and reload performance
saket0187 Jul 13, 2026
1a4cbcf
change icons
petrasovaa Jul 14, 2026
dcb4aa8
Merge branch 'main' into Add-stds-in-datacatalog
saket0187 Jul 17, 2026
89fe942
Merge branch 'main' into Add-stds-in-datacatalog
saket0187 Jul 22, 2026
a259ae8
Use grass.temporal directly and hides registered maps/layers
saket0187 Jul 24, 2026
810bb05
Add DataCatalogTreeModel class and export stds option & copy option f…
saket0187 Jul 26, 2026
118024e
Just reload whole mapset and remove _reloadDatasetNode
saket0187 Aug 2, 2026
ef6cb32
Merge branch 'main' into Add-stds-in-datacatalog
saket0187 Aug 3, 2026
2cf8848
Cleanups and add search filter
saket0187 Aug 4, 2026
f426b76
Use gui_core to launch Module dialog
saket0187 Aug 4, 2026
c298277
Fix sorting error and add dataset delete options
saket0187 Aug 9, 2026
ae853ae
Add comment and small optimisation
saket0187 Aug 9, 2026
81b55b8
Add fixes and improvements
saket0187 Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added gui/icons/grass/str3ds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions gui/icons/grass/str3ds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/icons/grass/strds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions gui/icons/grass/strds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/icons/grass/stvds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions gui/icons/grass/stvds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 66 additions & 8 deletions gui/wxpython/core/gconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from grass.pydispatch.signal import Signal

from grass.grassdb import history
from grass.grassdb.data import stds_exists
from grass.grassdb.history import Status

from core import globalvar
Expand Down Expand Up @@ -740,11 +741,31 @@ def OnCmdRun(self, event):
)
event.Skip()

@staticmethod
def _getStdsTypeCandidates(task):
"""Space time dataset types a generic stds parameter of a tool can be

The type option of the tool names either the dataset type
(G_OPT_STDS_TYPE) or the type of the maps it holds (G_OPT_MAP_TYPE),
which leaves a single type to look up instead of all three.
"""
stds_types = ("strds", "stvds", "str3ds")
map_types = {"raster": "strds", "vector": "stvds", "raster_3d": "str3ds"}
option = task.get_param(value="type", raiseError=False)
value = (option.get("value") or option.get("default")) if option else None
if value in stds_types:
return (value,)
if value in map_types:
return (map_types[value],)
return stds_types

def OnCmdDone(self, event):
"""Command done (or aborted)

Sends signal mapCreated if map is recognized in output
parameters or for specific modules (as r.colors).
Sends signal mapCreated if map is recognized in output parameters
and signal grassdbChanged for maps and space time datasets, either
recognized in output parameters or for specific modules (as r.colors
or t.register) which modify their input.
"""
# Process results here
try:
Expand Down Expand Up @@ -814,15 +835,23 @@ def OnCmdDone(self, event):
return

name = task.get_name()
# Parameter prompts used by space time datasets. The generic "stds" one
# is used where a parameter accepts any of the three dataset types.
stds_prompts = {"stds", "strds", "stvds", "str3ds"}
stds_candidates = self._getStdsTypeCandidates(task)
for p in task.get_options()["params"]:
prompt = p.get("prompt", "")
if prompt in {"raster", "vector", "raster_3d"} and p.get("value", None):
if prompt in {"raster", "vector", "raster_3d"} | stds_prompts and p.get(
"value", None
):
if p.get("age", "old") == "new" or name in {
"r.colors",
"r3.colors",
"v.colors",
"v.proj",
"r.proj",
"t.register",
"t.unregister",
}:
# if multiple maps (e.g. r.series.interp), we need add each
if p.get("multiple", False):
Expand All @@ -837,18 +866,47 @@ def OnCmdDone(self, event):
for lname in lnames:
if "@" not in lname:
lname += "@" + gs.gisenv()["MAPSET"]
if gs.find_file(lname, element=p.get("element"))["fullname"]:
self.mapCreated.emit(
name=lname, ltype=prompt, add=event.addLayer
element_name, element_mapset = lname.split("@", 1)

# The generic stds prompt does not say which dataset
# type this map is, so it is resolved per map. Keep it
# apart from prompt, which describes every value of
# the parameter and must stay the same for all of them.
element = prompt
if prompt == "stds":
element = next(
(
stds_type
for stds_type in stds_candidates
if stds_exists(
element_name, stds_type, element_mapset
)
),
None,
)
exists = element is not None
elif prompt in stds_prompts:
exists = stds_exists(element_name, prompt, element_mapset)
else:
exists = bool(
gs.find_file(lname, element=p.get("element"))[
"fullname"
]
)

if exists:
if element not in stds_prompts:
self.mapCreated.emit(
name=lname, ltype=element, add=event.addLayer
)
gisenv = gs.gisenv()
self._giface.grassdbChanged.emit(
grassdb=gisenv["GISDBASE"],
location=gisenv["LOCATION_NAME"],
mapset=gisenv["MAPSET"],
action="new",
map=lname.split("@")[0],
element=prompt,
map=element_name,
element=element,
)
if name == "r.mask":
action = "new"
Expand Down
14 changes: 14 additions & 0 deletions gui/wxpython/datacatalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,20 @@ def OnImportMenu(self, event):
menu.AppendItem(item)
self.Bind(wx.EVT_MENU, lambda evt: self.GuiParseCommand("v.in.ascii"), item)

menu.AppendSeparator()

item = wx.MenuItem(
menu, wx.ID_ANY, _("Import space time raster dataset [t.rast.import]")
)
menu.AppendItem(item)
self.Bind(wx.EVT_MENU, lambda evt: self.GuiParseCommand("t.rast.import"), item)

item = wx.MenuItem(
menu, wx.ID_ANY, _("Import space time vector dataset [t.vect.import]")
)
menu.AppendItem(item)
self.Bind(wx.EVT_MENU, lambda evt: self.GuiParseCommand("t.vect.import"), item)

menu.AppendSeparator()
menu.AppendMenu(wx.ID_ANY, _("Link external data"), subMenu)

Expand Down
Loading
Loading