In animation tool, when you don't provide the name without mapset, I try
to guess the mapset and the first would be the `modis@landamar`. So I am
not sure if this
[http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/animation/utils.py#L58
function] is wrong or if the output of t.list is wrong. t.list just gives
back the result of a SELECT in a database ordered alphabetically. Should
t.list return the results based on the search path if user doesn't specify
order? Or we perhaps need a function in the temporal API which would
behave like g.findfile? How is this solved in the temporal modules?
Replying to [comment:1 annakrat]:
> In animation tool, when you don't provide the name without mapset, I try
to guess the mapset and the first would be the `modis@landamar`. So I am
not sure if this
BTW, `g.gui.timeline` shows a dialog where the user can choose which
dataset he/she wants to use.
I need to implement a TGRASS API function that takes the user accessible
mapsets into account and sorts them as g.list does. Hence emulating the
mapset access right management. This function will then be used in t.list
and can be used in other modules.
I have implemented a new TGIS function (get_dataset_list[1]) that is able
to return a list of space time datasets or time stamped maps sensitive to
the users mapset access permissions. It uses the GRASS C-library functions
G_available_mapsets() via the TGIS RPC interface.
This function can be used in g.gui.timeline as well.
> I have implemented a new TGIS function (get_dataset_list[1]) that is
able to return a list of space time datasets or time stamped maps
sensitive to the users mapset access permissions. It uses the GRASS
C-library functions G_available_mapsets() via the TGIS RPC interface.
great, but the order of mapsets should respect search path, right?
{{{
g.mapset -p
modis2002lst_yfsg
Space time raster datasets with absolute time available in mapset
<landamar>:
modis@landamar
Space time raster datasets with absolute time available in mapset
<modis2002lst_yfsg>:
modis@modis2002lst_yfsg
modis_autumn@modis2002lst_yfsg
modis_m@modis2002lst_yfsg
modis_spring@modis2002lst_yfsg
modis_summer@modis2002lst_yfsg
modis_winter@modis2002lst_yfsg
s@modis2002lst_yfsg
}}}
The current mapset is listed as the second in this case.
Replying to [comment:7 martinl]:
> Replying to [comment:6 huhabla]:
> > Ooops ... please try r60026.
>
> perfect, now it's OK, thanks. See related tickets #2273 a #2274. Closing
this one.
Function `get_dataset_list` does not give you the right order of mapsets
because it returns unordered dictionary. Perhaps ordered dict (I think
it's in pygrass) or some tuples would be better? This function could also
give you the option not to respect the search path (maybe useful for data
catalog). `tgis.tlist` could then be a higher level wrapper, call
`get_dataset_list` and return the dataset names instead of sql rows. I
would then use it in g.gui.animation/timeline. `tgis.tlist_grouped` would
then call `tgis.tlist` and group names by mapsets which is used in the
selection widget. Does it sound too complicated?