[GRASS-dev] g.list sorting and mapset issues
Markus Neteler
neteler at osgeo.org
Wed Nov 26 08:21:48 PST 2014
hi,
the updated g.list in G7 still has two issues:
1) when identical map names exist in the current and an/other
mapset(s), the @mapset should be always printed (even if current):
GRASS 7.1.svn (nc_spm_08_grass7):~ > g.list rast | grep
lsat5_1987_div__pielou_size_5
lsat5_1987_div__pielou_size_5.0
lsat5_1987_div__pielou_size_5.0 at landsat
2) The default output should be sorted:
GRASS 7.1.svn (nc_spm_08_grass7):~ > g.list rast
...
lsat7_2002_61
lsat7_2002_62
lsat7_2002_70
lsat7_2002_80
ncmask_500m
ortho_2001_t792_1m
roadsmajor
slope
soilsID
soils_Kfactor
streams_derived
towns
urban
zipcodes
zipcodes_dbl
lsat5_1987_10
lsat5_1987_20
lsat5_1987_30
--> unsorted (in fact, likely sorted by mapset but then concatenated).
That needs to be changed here:
g.list/main.c, line 343
for (j = 0; (mapset = G_get_mapset_name(j)); j++)
make_list(fp, elem, mapset, separator, flag.type->answer,
flag.mapset->answer, use_region ? &window : NULL);
Thanks
Markus
More information about the grass-dev
mailing list