[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-dev
Subject:    [GRASS-dev] g.list sorting and mapset issues
From:       Markus Neteler <neteler () osgeo ! org>
Date:       2014-11-26 16:21:48
Message-ID: CALFmHhvRf2ZopupsJq6KU6H0i1+mC=L0us9sxCzWreBkX5uEQg () mail ! gmail ! com
[Download RAW message or body]

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@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
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic