[GRASS-dev] Re: test of v.area.thematic
Moritz Lennert
mlennert at club.worldonline.be
Wed Jan 2 16:34:54 EST 2008
On 02/01/08 19:53, Michael Barton wrote:
>> This should work:
>>
>> d.area.thematic map=censusblk_swwake data=total_pop breaks=`v.class -g
>> map=censusblk_swwake column=total_pop algo=std nbcla=4`
>> colors=0:0:255,0:0:100,100:0:0,255:0:0 layer=1 bwidth=0 bcolor=yellow
>> render=l
>
> Thanks Moritz. I'll try this when I get to my other computer.
>
> Why are you using backquotes here? This seems non-standard with respect
> to other GRASS commands. Any idea if this works better (or worse) on
> Windows and in a GUI setting?
Backquotes in *nix shell mean "the results of the command within these
backquotes". Theoretically it also should work in windows cmd.exe (but
will have to try to be sure)...
AFAIK, in the automatically created gui you cannot pass any information
from one module to another and (just tried) a back quoted command does
not work either, so the only way would be to create a file option in
v.class to write to a file and another file option in d.area.thematic to
read from it. Not sure if this is really worth it, though. I think that
for those who will use a gui we need to create a special thematic
mapping gui which combines all the modules doing something like (no idea
of the real python commands):
breaks=os.system('v.class -g ...')
legend=os.system('d.area.thematic -l ... breaks=breaks')
In any case, it was just a quick example for early-birds like you ;-)
Moritz
More information about the grass-dev
mailing list