Postscript Maps/Exports

The ps.map module offers the possibility to create very fine-tuned maps in postscript. Next to some interesting options that do not exist as display commands in GRASS, the great advantage over the raster export drivers is the fact that the postscript format can be transformed into a vector format which allows reworking parts of the file in vector graphics programs (see the Section called Editing the resulting postscript file with pstoedit for more details).

For beginners, the possibility of interactive usage of ps.map is very helpful, but many of its options are not available interactively and it is, therefore, recommended to create a script file with the instructions, once you are familiar with the general concept.

Interactive usage

For newcomers to ps.map, this is the best way to begin to learn the usage of ps.map. Just answer the questions, and be sure, at the end, to answer "y" to the question "do you want to save the script file? (y/n)". This will allow you to look at a script file in order to learn from it and adapt it for more fine-grained control (see next subsection). In order to visualize your map, use the postscript viewer of your system (ghostview, gv, etc...).

Scripted usage

This is where the entire power of ps.map really comes to play. Just have a look at all the commands listed on the manual page and you will get an idea of the possibilities offered. Having to write commands into a script file might seem a bit scary to some and definitely seems a bit outdated in our times of "point the mouse and let the computer do the rest for you", but once you understand the basic principles of ps.map, and once you have one or two finished script files at hand (created, for example, through interactive usage of ps.map), you will soon feel the convenience of just typing a few commands to create a very decent layout for your maps. This is also very practical when you work in a team as you can create one template script which will create the same layout for everyone and in which each team member only has to add a few commands to draw her maps.

All the commands are listed and explained on the manual page, so we won't cover those here. Be sure to look at the example script at the end of that page. However, here are some tips that might help you:

Generally, all you have to do once you have a script ready, is launch ps.map as follows:

ps.map in=NameOfYourScriptFile out=NameOfThePSFile

Easy, isn't it ? ;-)

Editing the resulting postscript file with pstoedit

The file containing your finished map after running ps.map is in postscript, the universal printing command language. There are not many programs that allow you to edit a postscript file directly (well, actually there are: text editors, but unless you are willing to learn the entire postscript command language, this won't be of much help to you). So, you can normally use your postscript file only in the same way you would a raster graphics file (i.e. .png or .jpeg), meaning that you cannot edit individual objects of the map, only each individual pixel.

However, there is a very handy little free software tool called pstoedit, written by Wolfgang Glunz. This allows you to transform your postscript file into a host of different vector formats which you can then edit easily in the relevant vector graphics program. For example, in order to translate a postscript file into a skencil (formerly "sketch") file, just type:

pstoedit -f sk YourPostscriptFile.ps ResultingFileName.sk

Then you can edit the entire map, including individual areas, lines and points in the skencil program.