Re: [GRASS-user] ps.map: Error Using Fill Patterns

2010-02-27 Thread Hamish
Rich Shepard wrote:
   In an input file to ps.map I have a vareas section with this:
 
 vareas house_basin
   pat $GISBASE/etc/paint/patterns/diag_down6.eps
   fcolor magenta
   end

   The module runs, but when I try to display the map
 using gv I get the
 raster displayed, but no vector maps. The following error
 is displayed in a separate window:
 

 Error: /rangecheck in --makepattern--

 Operand stack:
--dict:7/7(L)--   --nostringval--   false   --dict:7/8(L)--
 --nostringval--
 Execution stack:
%interp_exit   .runexec2   --nostringval--   --nostringval--
 --nostringval--   2   %stopped_push   --nostringval--   --nostringval--
 --nostringval--   false   1   %stopped_push   1905   1   3   %oparray_pop
 1904   1   3   %oparray_pop   1888   1   3   %oparray_pop   1771   1   3
 %oparray_pop   --nostringval--   %errorexec_pop   .runexec2
 --nostringval--   --nostringval--   --nostringval--   2   %stopped_push
 --nostringval--   1854   2   3   %oparray_pop   --nostringval--
 Dictionary stack:
--dict:1156/1684(ro)(G)--   --dict:0/20(G)--   --dict:115/200(L)--
 Current allocation mode is local
 Last OS error: 2
 Current file position is 62506913
 GPL Ghostscript 8.63: Unrecoverable error, exit code 1
 
   Ideas appreciated in how to resolve this.


(no idea)

does ps2ps help?

does removing that vareas instruction help?
does using a different or no pattern help?
any hints in the module output?


Hamish



  
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] ps.map: Error Using Fill Patterns

2010-02-27 Thread Rich Shepard

On Fri, 26 Feb 2010, Hamish wrote:


I'm not sure why but the quick fix is to just spell out the full path to
the file and not use the variable.


Hamish,

  Thank you. That's what I'll do.

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] ps.map: Error Using Fill Patterns

2010-02-27 Thread Rich Shepard

On Sat, 27 Feb 2010, Hamish wrote:


(no idea)


Hamish,

  I suspect this is the result of the same issue: file location. I'll
replace $GISBASE with the actual path and see if that makes a difference.

Thanks,

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] ps.map: Error Using Fill Patterns

2010-02-27 Thread Glynn Clements

Hamish wrote:

 so r_vareas.c scans the filename string for $GISBASE and expands it to
 G_gisbase() if needed. For some reason in yours it gets past that
 expansion somehow.

That feature is in 6.5 and 7.0 but not in 6.4.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] ps.map: Error Using Fill Patterns

2010-02-26 Thread Rich Shepard

On Fri, 26 Feb 2010, Rich Shepard wrote:


 Ideas appreciated in how to resolve this.


  Permissions not correct in /usr/local/grass-6.4svn/.

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] ps.map: Error Using Fill Patterns

2010-02-26 Thread Rich Shepard

On Fri, 26 Feb 2010, Rich Shepard wrote:


 Permissions not correct in /usr/local/grass-6.4svn/.


  What should the perms be? Here's the error:

can't open eps file $GISBASE/etc/paint/patterns/diag_up6.eps

  But, from within grass64 I can successfully 'less
$GISBASE/etc/paint/patterns/diag_up6.eps'

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] ps.map: Error Using Fill Patterns

2010-02-26 Thread Hamish
Rich Shepard wrote:
 Here's the error:
 
 can't open eps file
 $GISBASE/etc/paint/patterns/diag_up6.eps
 
   But, from within grass64 I can successfully 'less
 $GISBASE/etc/paint/patterns/diag_up6.eps'


by the time it gets to that error message, the $GISBASE should have been
expanded to the full path, but for some reason it hasn't been. Shell
variables only work from the shell, so if you get ps.map instructions
from an input file you need the full path.

On the other hand if you do:

ps.map out=test.ps  EOF
...

  pattern $GISBASE/etc/paint/...
...
EOF

shell variables are ok  get expanded.


BUT, this is a PITA for version/machine portability of instruction files
so r_vareas.c scans the filename string for $GISBASE and expands it to
G_gisbase() if needed. For some reason in yours it gets past that
expansion somehow. I'm not sure why but the quick fix is to just spell
out the full path to the file and not use the variable.


Hamish



  
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user