mapgen how to!

Jill Schuler jschuler at tulip.itc.nrcs.usda.gov
Mon Oct 27 13:28:06 EST 1997


Stephan,

Sorry,  I missed your question on MAPGEN! :}

Mapgen for the most part only uses vector data from GRASS.  However, recently
I have worked on a raster tool called make.rast which allows you to convert
the raster information into MAPGEN line format files.  I can make this src
available to you.

As for information on using MAPGEN most of the documentation is in hardcopy
only.  However,  under the $GISBASE/mapgen/docs directory there are some
postscript files that cover some of the MAPGEN interface commands.  Also, 
there is a g.mapman command for other online documentation.

MAPGEN  and the GRASS/MAPGEN Interface software will allow you to 
generate output that is cartographically far superior to any output
that can be generated with ps.map.  

The mapping software supports the creation of all essential elements
that comprise a quality cartographic product, unlike ps.map.

Briefly,  here are the basics on MAPGEN use:


GEOGRAPHIC TASKS_____________________________________________________________ 

make.mapdef --builds map definition file
make.line --converts GRASS vector data to MAPGEN line overlay
make.label --converts GRASS vector point data (sites, dig_att, or dig_cats)
             to text. 
make.symbol--converts GRASS vector point data (sites, dig_att, or dig_cats)
             to symbol
make.fill --converts GRASS vector polygon data to line fill layer
make.rast --converts GRASS raster data to MAPGEN line overlay


GEOREFERENCE TASKS_____________________________________________________________ 

All GRASS data is converted to lat/long for use in MAPGEN using the following
commands:

dig.to.geo
iso.to.geo
flow.to.geo
linepat.to.geo
sites.to.geo
cats.to.geo
att.to.geo
r.to.diggeo

These commands use the PERMANENT PROJ_INFO values to georeference the data. 
Information is stored under the MAPSET dig_geo and sites_geo directories.  The 
dig_geo data is stored in compressed format using the gzip command suite.


NON-GEOGRAPHIC BASED TASKS_____________________________________________________

make.legend
make.neatline
make.barscale
make.arrow
make.grid
make.text

These commands are centimeter based and totally dependent on the map definition
file information.  If you change the scale or margins around your data then
these features will no longer be positioned correctly.  There is a command 
called tr_el to allow you to shift centimeter positions.


OUTPUT COMMANDS_____________________________________________________________

GRASS monitor
show.sh --displays contents of ovm directory to screen
d.view --displays select ovm files to screen with pan/zoom functionality
d.ovm --displays contents of ovm directory to screen but reads user defined
        .colortable prior to erasing the screen
xzoom --gui viewing utility


Printer or Plotters
plot.sh
plotter

refer to the src file devlist.c under mapgen/nrcs/plotter for devices supported.


PREPARATION IN GRASS_________________________________________________________

1. Before construction of a MAPGEN map, use the GRASS d.zoom command to select
a data area to map.  Be sure to get as close to the desired data area as 
possible.

BUILD A BASEMAP_______________________________________________________________

1. Run the make.mapdef command to build a map.def file.
I usually run this command with margins set to zero to establish a relationship
between the paper size and the viewing scale.  Once I get the scale,  re-run
the make.mapdef command setting the margins to allow space for title, legend, 
barscale, source note, etc.

2. Run the make.neatline command to define the plotting limits for the data
area and the plot area. You should run this command twice using different 
names for the ovm layer.

3. Run the make.line command to build a geographic feature like a boundary.
Repeat this command with all the geographic map layers to be added to the
base map.

4. Run the command make.symbol to add geographic point features to the data
area.

5. Run the command make.label to add geographic point labels to the data 
area.

6. Run make.text to add support map text like title, source note, etc.

7. Run make.barscale to add a graphic scale

8. Run make.grid to add geographic annotation or use make.arrow for north
reference.

9. Run make.legend to build a legend.

****Note: use the command show.sh to view the overlays at any point. You
    can also use the d.view command to allow you to zoom/pan around the
    overlays.  The d.view command generates a .d_view file that can be
    removed to return to the default view.



BUILDING A THEMATIC MAP LAYER______________________________________________

1.  Use the command copy.map to copy the base map to the new thematic map 
directory.

2.  Run the command make.fill to build a thematic fill layer or run the 
command make.rast to build a thematic raster layer.

3.  Run the command make.legend to build a thematic fill legend.


There are more commands, but these are the basics.  Look under the 
$GISBASE/mapgen/interface directory for other commands.  Most commands
are interactive and prompt you for input.  Additionally, there are some
really cool bar/pie/dot programs for specialized cartographic
applications.

Hope this helps,

Feel free to email me with other questions.

mapjill :)

Jill
__________________________________________ 
     ____     __ ______   _____  _______        . 
      / \   //  /    // /    // //    //       / \
     /  \  //  /    // /       //             /   \
    /   \ //  /____// /       //____///      /.....\/\    /\
   /    \//  /  \\   /              //      /       \_/\_/  \
 _/     \/__/    \\_/_____//______ //    /\/             _/\ ---------
________________________________________/

Jill R. Schuler
USDA 
Natural Resource Conservation Service
2627 Redwing, Suite 120
Ft. Collins, Co 80526                     FAX: (970) 282-1930
					  VCOMM:9010-2418
e-mail: jschuler at itc.nrcs.usda.gov        Phone: (970) 282-2418

 "In politics, if you want anything said, ask a man;
 if you want anything done, ask a woman."
     --- Margaret Thatcher



More information about the grass-user mailing list