Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
You did not give the Wiki URL nor your GRASS version... –  markusN Mar 21 '13 at 23:46

1 Answer 1

up vote 1 down vote accepted

the ps.map function requires you specify output. The example you have:

> ps.map input=spearfish.map

doesn't specify the output variable. I'm not sure what the distinction between the code boxes is. The former should work because the input raster is defined with "raster" and output defined at the top. It looks like you're trying to replicate an example; is this correct?

Perhaps you could try:

ps.map input=elevation.10m output=spearfish.map

You can specify the additional options as well just as the code example did.

share|improve this answer
1  
I should have specified that the second code box is the content of the file spearfish.map, which is the input value in the first code box. Unless I'm misunderstanding the ps.map input command, the output should be correctly specified in that file. –  pyrogerg Mar 21 '13 at 21:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.