A couple of strange behaviors with a test vector dataset whose columns are population projections every 5 years:<br>I ran the following script below but: <br>1. I see it working ok on the x0 monitor; but the output png files are all blank..<br>
2. and i get messages while the script is running that include 'segmentation fault' but not on EVERY iteration of the loop..<br><br>---------------------script-------<br>#!/bin/bash<br>#generate 5yr interval thematic pngs of low series PPIC population projectiosn<br>
yr=2010<br>while [ $yr -lt 2105 ] ; do<br><br>#actions here<br>echo "yr is $yr "<br><br>d.thematic.area map=CountyPop column=pc$yr breaks=20,40,60 colors=cyan,blue,yellow,red<br>d.out.file output=pop$yr format=png<br>
#<br>yr=$((yr+5))<br>done<br>------------------------messages while running above script-----<br><br>---<br>yr is 2020 <br>Segmentation fault<br>Saving display from Monitor: [x0] to <pop2020.png>.<br>Image size [640 x 480]<br>
Screen export complete. (writing the file may take a small amount of time)<br>Image crop [523 x 480]<br>Done.<br>yr is 2025 <br>Segmentation fault<br>Saving display from Monitor: [x0] to <pop2025.png>.<br>Image size [640 x 480]<br>
Screen export complete. (writing the file may take a small amount of time)<br>Image crop [523 x 480]<br>Done.<br>yr is 2030 <br>Segmentation fault<br>Saving display from Monitor: [x0] to <pop2030.png>.<br>Image size [640 x 480]<br>
Screen export complete. (writing the file may take a small amount of time)<br>Image crop [523 x 480]<br>Done.<br>yr is 2035 <br>Saving display from Monitor: [x0] to <pop2035.png>.<br>Image size [640 x 480]<br>Screen export complete. (writing the file may take a small amount of time)<br>
Image crop [523 x 480]<br>Done.<br>yr is 2040 <br>Saving display from Monitor: [x0] to <pop2040.png>.<br>Image size [640 x 480]<br>Screen export complete. (writing the file may take a small amount of time)<br>Image crop [523 x 480]<br>
Done.<br>yr is 2045 <br>Saving display from Monitor: [x0] to <pop2045.png>.<br>Image size [640 x 480]<br>Screen export complete. (writing the file may take a small amount of time)<br>Image crop [523 x 480]<br>Done.<br>
------<br><br><div class="gmail_quote">On Thu, Apr 2, 2009 at 11:54 PM, Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 03/04/09 00:23, Vishal Mehta wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br>
<br>
I am better at GRASS raster capabilities than with GRASS vector handling, so I am writing to get your help.<br>
<br>
What I want to do is this:<br>
1. I will have one vector dataset of watersheds. Each record is a polygon, an individual watershed. There are, apart from the usual cat fields, 52 attribute columns. Each attribute column is modeled weekly snow depth.<br>
<br>
2. I need to automate the display and export to png of 52 thematic images - one for each week/column - keeping the color scheme constant throughout. Then all of the images will be packaged into a kml animation.<br>
<br>
I know how to do the above starting from a stack of GRASS rasters, but am not quickly getting a handle on displaying GRASS vectors consistently. I've tried d.vect and d.vect.thematic. I havent tried d.thematic.area yet.<br>
<br>
The main issues are that I dont know:<br>
- how to assign a constant color scheme to each map (that spans the min and max of all columns); i guess i was looking for something as simple as setting color rules like with raster data.<br>
</blockquote>
<br></div>
If you want constant class breaks, i.e. the same class number and amplitudes linked to the same colors, then you can just manually provide breaks and colors in d.thematic.area.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
- how to refer to each attribute column by column number in a loop (d.vect.thematic and d.thematic.area seem to need column name as attribute)<br>
</blockquote>
<br></div>
(assuming you are in a *nix environment with a shell):<br>
for col in `<a href="http://v.info" target="_blank">v.info</a> -c MapName`; do d.thematic.area .... column=$col; done<br>
(note the backticks around the <a href="http://v.info" target="_blank">v.info</a> command))<br><font color="#888888">
<br>
Moritz<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Vishal K. Mehta, PhD<br>Scientist<br>Stockholm Environment Institute - US<br>133 D St Suite F<br>Davis CA 95616<br><a href="http://www.sei-us.org">www.sei-us.org</a><br>