[GRASS-user] automating map production in Grass
Moritz Lennert
mlennert at club.worldonline.be
Thu Feb 21 05:43:08 EST 2008
On 21/02/08 00:08, Alysson Whitlam wrote:
> Hi,
>
> I am just beginning to work with Grass, although I am fairly experienced
> with ArcGIS, including scripting for map production and geoprocessing
> (Python and VBA). Basically, I am looking to automate map production in
> Grass, using a script (Python or Perl preferably?). (I have to output
> several hundred maps, based on sections of a polygon layer). Since I am
> just beginning to use Grass, I am wondering if anyone could please give
> me an idea if this type of task can be accomplished in Grass.
ps.map is probably the best candidate for scripting, i.e. creating
ps.map instruction files on the fly, then running ps.map on them to
create ps files.
Attached an example script for map production combining some
postgresl-plr magic (using R functions to decide on class breaks) with
d.vect.thematic's psmap option and ps.map. It should give you an idea of
how to do such scripting. It obviously all depends on the types of maps
you are speaking about.
You can loop through maps and variables and call this script at each turn.
Note the line "echo "read
/home/mlennert/ULB/Templates/igeat_a4p_BEL.psmap">> $variable.psmap"
The file igeat_a4p_BEL.psmap contains generic layout features such as
paper size, legend, scalebar and institutional logo placement.
Moritz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indics.sh
Type: application/x-shellscript
Size: 1931 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20080221/cdbe20aa/indics.bin
More information about the grass-user
mailing list