[GRASS-user] ps.map area fill pattern location variable
    Hamish 
    hamish_b at yahoo.com
       
    Wed Jun 10 09:34:18 EDT 2009
    
    
  
John wrote:
> I'm making a map with postscript fill patterns using the
> vareas option in ps.map.
> 
> In the wiki pages, the path to the fill patterns is:
> 
> $GISBASE/etc/paint/patterns/diag_up.eps
> 
> But when I use that in the script, the $GISBASE variable is
> not expanded and I get the error:
> 
> can't open eps file
> <$GISBASE/etc/paint/patterns/diag_up.eps>
> 
> The file does exist and can be accessed at the location
> from the GRASS prompt.
> 
> Why doesn't ps.map expand the variable?
that example is expecting input from stdin not a file, so the shell
expands it. e.g.
ps.map out=test.ps << EOF
raster elevation
vareas fields
  pattern $GISBASE/etc/paint/patterns/diag_up.eps
  end
end
EOF
for input from a real file you have to type out the full path.
type "echo $GISBASE" at the grass terminal prompt to get that.
I've just modified the code in 6.5 and 7.x svn to automatically expand
$GISBASE for you if it is found in the EPS filename and input is from
a file.
Hamish
      
    
    
More information about the grass-user
mailing list