I'm trying to run a script from the GRASS WiKi to create a simple map using ps.map
. I'm confused because it's generating an error that the output was not set, when it appears to me that it is set at the beginning of the script. The script and error follow. The first code box contains the contents of the file spearfish.map, which is referenced as the input value in the second code box.
# Simple ps.map example using the Spearfish dataset
g.region rast=elevation.10m
ps.map output=spearfish.ps << EOF
paper us-letter
end
scale 1:120000
raster elevation.10m
colortable
where 2 6.75
end
text 50% -7% Spearfish County, ND (Mount Rushmore)
fontsize 16
end
mapinfo
where 4.5 7.25
end
vlines roads
where label ~ 'highway' OR label = 'interstate'
color grey
end
vpoints archsites
symbol basic/triangle
end
end
EOF
The command for running the script and the error it generates are below:
> ps.map input=spearfish.map
ERROR: Required parameter <output> not set:
(PostScript output file)
UPDATE: Based on ShaunLangley's comment, I tried ps.map output=out.map
. This seems to have started ps.map in interactive mode and I was able to enter the rest of the script one line at a time. That did create a map as a postscript file, so I'm headed in the right direction. I'll close this thread as solved and open a new one more targeted on the question of how to run the commands as a script.