home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Enter 1999 June / enter_06_1999.iso / doc / HOWTO / mini / GIS-GRASS < prev    next >
Text File  |  1998-10-14  |  69KB  |  1,547 lines

  1.  
  2.     This document is not subject to copyright. See section 9 below.
  3.     Version 1.0: 13 November 1997
  4.     
  5.    
  6.                            THE GIS-GRASS MINI-HOWTO
  7.                                        
  8.    
  9.     by David A. Hastings
  10.     U. S. Department of Commerce
  11.     National Oceanic and Atmospheric Administration
  12.     National Geophysical Data Center
  13.     Boulder CO 80303
  14.     dah@ngdc.noaa.gov
  15.     
  16.    
  17.    
  18.    _Summary:_ This document describes how to acquire, install and
  19.    configure a powerful scientific public-domain Geographic Information
  20.    System (GIS): the Geographic Resources Analysis Support System
  21.    (GRASS). It provides information on other resources for learning more
  22.    about GRASS, GIS in general, for acquiring data, etc.
  23.    
  24.    This document also encourages the Linux community to consider
  25.    enhancing this software as a major application of UNIX/Linux. ("When
  26.    will Linux become bundled with public domain or Linux Public License
  27.    'killer aps'"?) For more on this topic, see Section 8 below.
  28.    
  29. Contents
  30.  
  31.     1. _What is a GIS?
  32.    What is GRASS?
  33.    A Brief History of GRASS
  34.          1. A Re-Invogorated GRASS Management Model
  35.          2. Continued Assessment of Future GRASS Management
  36.    System Requirements for GRASS
  37.    How to Acquire GRASS
  38.    How to Get GRASS Running on Your Linux-based Computer.
  39.    Web-based Support for GRASS (and for GIS Matters in General)
  40.    The Future of GRASS?
  41.    Copyright Notice, and Notice on Support of this Document
  42.    References_
  43.        
  44.    
  45.    
  46.    _Appendix A: Acquisition/Installation of GRASS4.1.3 Binaries
  47.    Appendix B: Acquisition/Installation of GRASS4.1.5 Binaries
  48.    Appendix C: Acquisition/Compilation of GRASS 4.1.x and 4.2 Source Code
  49.    
  50.    Appendix D: If you plan to enhance any part of GRASS, read this first!
  51.    
  52.    Appendix E: Example Linux versions of some critical GRASS files. _
  53.      _________________________________________________________________
  54.    
  55.   1. What is a GIS?
  56.   
  57.    
  58.    
  59.    There are many ways to describe a Geographic Information System. Here
  60.    are three working definitions (from David A. Hastings, 1992,
  61.    Geographic Information Systems: A Tool for Geoscience Analysis and
  62.    Interpretation):
  63.     1. (The minimal definition): A GIS is a hardware/software system for
  64.        the storage, management, and (with hardcopy or screen graphic)
  65.        selective retrieval capabilities of georeferenced data.
  66.        Definitions like this one are often used by vendors and users of
  67.        vector-only GIS, whose objective is sophisticated management and
  68.        output of cartographic data.
  69.     2. (A parallel definition): A GIS is a hardware/software system for
  70.        managing and displaying spatial data. It is similar to a
  71.        traditional Data Base Management System, where we now think in
  72.        _spatial_ rather than in tabular terms, and where the "report
  73.        writer" now allows output of maps as well as of tables and
  74.        numbers. Thus we can consider a GIS a "spatial DBMS" as opposed to
  75.        traditional "tabular DBMSs." Few people use this definition, but
  76.        it might help to explain GIS to a DBMS user.
  77.     3. (A more aggressive definition): A GIS is a system of hardware,
  78.        software, and data that facilitates the development, enhancement,
  79.        modeling, and display of multivariate (e.g. multilayered)
  80.        spatially referenced data. It performs some analytical functions
  81.        itself, and by its analysis, selective retrieval and display
  82.        capabilities, helps the user to further analyze and interpret the
  83.        data. Properly configured, the GIS can model (e.g. synthetically
  84.        recreate) a feature or phenomenon as a function of other features
  85.        or phenomena which may be related - where all features or
  86.        phenomena are represented (characterized) by spatial and related
  87.        tabular data. The analytical objectives described here are
  88.        sometimes controversial - and often given lip service by
  89.        cartographic GIS specialists who have not yet seen what can be
  90.        accomplished scientifically by a select few GISs that go beyond
  91.        cartographic approaches.
  92.     4. Another definition can be found at
  93.        http://www.geo.ed.ac.uk/home/research/whatisgis.html at the
  94.        University of Edinburgh
  95.        
  96.   2. What is GRASS?
  97.   
  98.    
  99.    
  100.    GRASS (Geographic Resources Analysis Support System) is a public
  101.    domain raster based GIS, vector GIS, image processing system, and
  102.    graphics production system. Created by the US Army Corps of Engineers,
  103.    Constriction Engineering Research Laboratory (USA/CERL) and enhanced
  104.    by many others, it is used extensively at government offices,
  105.    universities and commercial organizations throughout the world. It is
  106.    written mostly in C for various UNIX based machines. Linux is one of
  107.    its more robust implementations.
  108.    
  109.    GRASS contains over 40 programs to render images on monitor and paper;
  110.    over 60 raster manipulation programs; over 30 vector manipulation
  111.    programs; nearly 30 multi-spectral image processing manipulation
  112.    programs; 16 data management programs; and 6 point file management
  113.    programs.
  114.    
  115.    GRASS' strengths lie in several fields. The simple user interface
  116.    makes it an ideal platform for those learning about GIS for the first
  117.    time. Users wishing to write their own code can do so by examining
  118.    existing source code, interfacing with the documented GIS libraries,
  119.    and by using the GRASS Programmers' Manual. This allows more
  120.    sophisticated functionality to be fully integrated within GRASS.
  121.    
  122.    Other strengths include GRASS' pioneering of mixed resolutions in a
  123.    data base, mixed geographic coverage areas in a data base, raster
  124.    image compression techniques via run-length encoding and
  125.    reclassification lookup tables, GRASS' rescaling of display images on
  126.    the fly to fill the display screen, plus its fundamental design
  127.    criterion of powerful computer-assisted scientific analysis of
  128.    environmental issues (as opposed to merely going for intricate
  129.    cartographic output of relatively simple processes).
  130.    
  131.    GRASS is usually supplied as free, non-copyright source code to be
  132.    compiled on host machines. Some compiled binaries are also easily
  133.    obtainable at no cost via the Internet. It runs on a variety of UNIX
  134.    platforms.
  135.    
  136.    (Copied from Project Assist Intro to
  137.    GRASS:http://www.geog.le.ac.uk/assist/grass)
  138.    
  139.   3. A Brief History of GRASS
  140.   
  141.    
  142.    
  143.    In the early 1980s the U. S. Army Corps of Engineers' Construction
  144.    Engineering Research Laboratory (USA/CERL) in Champaign, Illinois,
  145.    began to explore the possibilities of using Geographic Information
  146.    Systems to conduct environmental research, assessments, monitoring and
  147.    management of lands under the stewardship of the U. S. Department of
  148.    Defense. Part of the motivation for this action was new responsibility
  149.    for the environment encoded into the National Environmental Policy Act
  150.    of the late 1970s.
  151.    
  152.    Bill Goran of USA/CERL conducted a survey of available GISs, assuming
  153.    that he could find several systems capable of environmental analysis,
  154.    from which he could select one or more to recommend for use by CERL
  155.    and perhaps others in the Department of Defense. However, he was
  156.    surprised to find no GIS that satisfied his needs. What started as a
  157.    selection process turned into a design exercise for his own GIS
  158.    development program.
  159.    
  160.    USA/CERL hired several programmers, and began by writing a hybrid
  161.    raster-vector GIS for the VAX UNIX environment. This made the team one
  162.    of the first to seriously develop GIS for UNIX. Though they still
  163.    faced challenges with different versions of UNIX, they developed
  164.    procedures of coding in ANSI standard UNIX, avoiding "tweaking" the
  165.    code toward any particular vendor-specific flavor of UNIX.
  166.    
  167.    GRASS developed a programming style characterized by:
  168.      * Use of UNIX libraries where possible, plus the creation of GRASS
  169.        libraries for repeated GIS-specific acts such as opening raster
  170.        files that might be compressed (by run-length encoding) or not.
  171.      * The ability to handle both major GIS data types: raster and
  172.        vector.
  173.      * The favoring of raster data processing, as scientific analysis was
  174.        easier to encode with raster (than for vector) data models.
  175.      * The ability to handle raster grids of mixed grid sizes in the same
  176.        data base. This was a departure from raster's image processing
  177.        tradition of requiring identical (and perfectly registered) grid
  178.        cell arrays in each and every data layer.
  179.      * The ability to handle raster grids with different areas of
  180.        coverage. Again, this was a departure from raster tradition of
  181.        having all grids be identical in geographic coverage.
  182.      * The ability to run-length encode raster data files, in order to
  183.        greatly reduce file sizes of most files.
  184.      * The separate structure of reclassification files. Such files
  185.        merely contained a look-up table noting the previous and new
  186.        classes. This is MUCH more compact than replicating the original
  187.        grid with different numerical values. A reclassified file of a
  188.        100x100 km square area of 10 metre grid cells would be a few
  189.        hundred bytes, rather than 100 megabytes of uncompressed 8-bit
  190.        raster data.
  191.      * The acceptance of de-facto standard data models. While competitors
  192.        created cumbersome (and in many cases secretive) data formats,
  193.        GRASS accepted the de-facto standard Digital Line Graph vector
  194.        format and unheaded binary raster grid format. GRASS later
  195.        abandoned DLG as its internal vector file format, and let its
  196.        raster format evolve. However, DLG and the unheaded binary raster
  197.        grid are still routinely handled formats for GRASS, and its new
  198.        formats are as open as its previous ones.
  199.      * GRASS code was managed in several directories. Initial
  200.        contributions were placed in the src.contrib directory. More solid
  201.        code was moved to the src.alpha directory. After remaining in the
  202.        src.alpha for one full release cycle, the code, with resultant bug
  203.        fixes, moved to the most honorable level, the src directory.
  204.        
  205.    
  206.    
  207.    GRASS was overseen by three levels of oversight committees. USA/CERL
  208.    kept the ultimate responsibility for GRASS. It implemented most GRASS
  209.    development, and carried out the day-to-day management of GRASS
  210.    testing and release. The GRASS Interagency Steering Committee (GIASC),
  211.    comprised of other Federal agencies, met semi-annually to review
  212.    development progress, and evaluate future directions for GRASS.
  213.    (Academic and commercial participants in GRASS also attended GIASC
  214.    meetings; only part of each meeting was "Federal-Agencies-only." GRASS
  215.    eventually became nominally and officially a "product" of the GIASC,
  216.    though everyone recognized USA/CERL's leadership role. The GRASS
  217.    Military Steering Committee met periodically to review the progress of
  218.    GRASS in serving its original intent: meeting the Department of
  219.    Defense's needs to evaluate and manage the environment of military
  220.    lands.
  221.    
  222.    The public interacted with CERL and GIASC through USA/CERL's GRASS
  223.    Information Center. GRASS Beta testing was very widespread, and quite
  224.    intensive for the leading users of GRASS. Several leading users, such
  225.    as the National Park Service and the Soil Conservation Service,
  226.    selected GRASS as its prime or only GIS. They made significant
  227.    commitments to enhance and test GRASS, yet considered this investment
  228.    well worth their while. They said that they had more influence over
  229.    the direction of GRASS than they would over any known alternative
  230.    system. They also felt that, despite their major efforts and expenses
  231.    in supporting GRASS, they had a bargain in relevant power for the
  232.    dollar.
  233.    
  234.    Several universities adopted GRASS as an important training and
  235.    research environment. Many conducted short-courses for the public, in
  236.    addition to using GRASS in their own curricula. Examples of such
  237.    leading academic users of GRASS are Central Washington University, The
  238.    University of Arkansas, Texas A & M University, The University of
  239.    California at Berkeley, and Rutgers University.
  240.    
  241.    Though GRASS received some criticism (some say) for being so good and
  242.    so public, it was also reputedly borrowed from liberally by some
  243.    developers of other systems. Though the first group might have viewed
  244.    it as unfair competition, the second group may have noted that it was
  245.    not copyright, and was a valuable testbed for GIS concepts. GRASS
  246.    received an award from the Urban and Regional Information Systems
  247.    Association (URISA) for quality software in 1988.
  248.    
  249.    As CERL and GRASS evolved through the late 1980s and early 1990s, CERL
  250.    attempted to cut overhead costs associated with supporting the public
  251.    domain version. It created and initially funded the Open GRASS
  252.    Foundation, in cooperation with several of the leading users of GRASS.
  253.    The Open GRASS Foundation has since evolved into the Open GIS
  254.    Consortium, which is aiming for more thorough interoperability at the
  255.    data and user interface level, but appears not to be taking advantage
  256.    of the major open GIS testbed (GRASS).
  257.    
  258.    In 1996 USA/CERL, just before beginning the beta testing for GRASS
  259.    version 5.0, announced that it was formally withdrawing support to the
  260.    public. USA/CERL announced agreements with several commercial GISs,
  261.    and agreed to provide encouragement to commercialization of GRASS. One
  262.    result of this is GRASSLANDS:http://www.las.com/grassland/, a
  263.    commercial adaptation of much of GRASS. Another result is a migration
  264.    of several former GRASS users to COTS (Commercial Off-The-Shelf) GISs.
  265.    However, GRASS' anonymous ftp site contains many enhancements to the
  266.    last full version 4.1 release of GRASS. Many organizations still use
  267.    GRASS feeling that, despite the lack of a major release in five years,
  268.    GRASS still leads the pack in many areas.
  269.    
  270.     3.1 A Re-Invogorated GRASS Management Model
  271.     
  272.    
  273.    
  274.    In late 1997, a group at Baylor University took the lead in developing
  275.    a new Website for GRASS. This quickly developing Website contains
  276.    GRASS 4.1 source code and Sun Solaris binaries, GRASS 4.1
  277.    documentation, and an on- line manual. By November 1997 this site
  278.    posted the first version of GRASS 4.2 source code and binaries
  279.    currently for Sun Solaris) with Linux and Windows NT under
  280.    consideration). GRASS 4.2 incorporates several enhancements from the
  281.    CERL website, plus some of Baylor's own enhancements. Documentation
  282.    for GRASS 4.2 is appearing; the group encourages cooperation in
  283.    further development of GRASS, and is looking for partners. It hopes to
  284.    use increased use of the World Wide Web in developing and managing
  285.    GRASS. GRASS 5 development and compilation is underway. The site also
  286.    links to the Blackland GRASS site at Texas A&M University, for those
  287.    desiring very inexpensive access to GRASS for Windows 95.
  288.    
  289.     3.2 Continued Assessment of Future GRASS Management
  290.     
  291.    
  292.    
  293.    Note: An ad-hoc group (which includes myself) is exploring the basic
  294.    issue of continued, reconfigured, yea perhaps increased, value of
  295.    GRASS as a public test-bed for GIS technology. It is exploring
  296.    shepherding the testing and release of GRASS5.0, and exploring
  297.    possibilities for a more distributed management model for GRASS design
  298.    and development. It is exploring the universe of public domain spatial
  299.    data processing software (including geographic information and image
  300.    processing systems), and perhaps tabular data base management systems.
  301.    How can such knowledge be (1) optimized as an open, public test bed
  302.    for such technology and (2) better used by the public? Might this
  303.    involve a Linux management model, perhaps? See Section 8 for more
  304.    discussion on this topic.
  305.    
  306.   4. System Requirements for GRASS
  307.   
  308.    
  309.    
  310.    Minimum requirements include:
  311.      * 8 Mbytes of memory (of course, more is better..)
  312.      * 100 Mbytes of free disk space
  313.           + ~40 mb for executables,
  314.           + ~40 mb for source code (which you can ignore if you merely
  315.             install the Linux binaries)
  316.           + ~? for data (the veritable bottomless pit can be filled with
  317.             data, if you so choose)
  318.             
  319.    
  320.    GRASS runs on Linux kernel versions as old as 1.2.13 (see more
  321.    information in the appendices for various specific binaries).
  322.    GRASS will run in text mode. However, for displays of data, you will
  323.    need X. If you are still running a version of X, it will probably work
  324.    with GRASS.
  325.    
  326.    If you find any other hardware/OS requirements that should be
  327.    mentioned, please let me know!
  328.    
  329.   5. How to Acquire GRASS
  330.   
  331.    
  332.    
  333.    GRASS used to be available on tape from various companies that signed
  334.    distribution agreements with USA/CERL. These companies usually
  335.    supported specific platform environments, such as Masscomp, Sun, DEC,
  336.    Hewlett Packard, IBM (risc), PC (running some flavor of UNIX), and
  337.    Macintosh (running AUX). Until recently, the flavors of UNIX working
  338.    on PCs generally were too low-end, or required too much added
  339.    programming support (e.g. programming drivers for high-end graphics
  340.    boards like the Number Nine boards of several years back) to be stable
  341.    or complete. However, with robust systems like Linux, this problem is
  342.    history. Similarly, few people acquire GRASS on tape, though a few do
  343.    on CD-ROM.
  344.    
  345.    The main way to acquire GRASS is to get it via anonymous ftp from:
  346.    
  347.    _1. The new site at Baylor University:http://www.baylor.edu/~grass_
  348.    
  349.    As of the date of this version of the mini-HOWTO, Baylor has source
  350.    code for GRASS 4.1 and 4.2, as well as Sun Solaris compiled binaries.
  351.    Blackland GRASS for Windows 95/NT is linked to from this site. Baylor
  352.    is considering its own Linux and Windows NT binaries, as well. You
  353.    should be able to compile the Baylor source code under Linux yourself,
  354.    using information in this mini-HOWTO.
  355.    
  356.    _2. The traditional site at USA/CERL:http://www.cecer.army.mil/grass_,
  357.    or from mirrors cited at USA/CERL's website:
  358.    
  359.    The ftp location is:
  360.    
  361.    _moon.cecer.army.mil_
  362.    
  363.    Appendix A describes how to acquire and install GRASS4.13 compiled
  364.    binaries from USA/CERL. (See section 6 before installing GRASS!)
  365.    
  366.    Appendix B describes how to acquire and install GRASS4.15 compiled
  367.    binaries from USA/CERL. (See section 6 before installing GRASS!)
  368.    
  369.    Appendix C describes how to acquire and compile GRASS4.14 and
  370.    GRASS4.15 source code from USA/CERL, as well as GRASS4.2 source code
  371.    from Baylor University. (See section 6 before installing GRASS!)
  372.    
  373.    Linux distribution developers! Might you be interested in including
  374.    GRASS with your distribution? Remember, GRASS source code is in the
  375.    completely unrestricted, copyright-free, public domain. Your
  376.    distribution might be more valuable if it contained source code and/or
  377.    compiled binaries for GRASS.
  378.    
  379.   6. How to Get GRASS Running on Your Linux-based Computer.
  380.   
  381.    
  382.    
  383.    Appendices A, B, and C describe how to acquire and install GRASS.
  384.    Before actually installing GRASS, you will have to decide where to put
  385.    three parts of the system:
  386.     1. The GRASS binaries, source code (if you install this), man pages,
  387.        documentation, and the like. Many folks put this stuff off
  388.        /usr/local (e.g. /usr/local/grass/bin, /usr/local/grass/src).
  389.     2. The GRASS executable and gmake utilities. Some folks put this
  390.        stuff off /usr/local (e.g. /usr/local/grass/grass4.1 and gmake4.1
  391.        or /usr/local/bin/grass4.1 and gmake4.1).
  392.     3. The GRASS data directories. These can go anywhere, as they are
  393.        specified in configuration files.
  394.        
  395.        I have used a different scheme for a decade. As GRASS code,
  396.        binaries, and the like (except data owned by users) are all owned
  397.        by the special user "grass" I don't want this stuff to get spread
  398.        around my system. I create a new directory (usually on a separate
  399.        file system) called /user, and put all my GRASS stuff below this.
  400.        For example:
  401.  
  402. /user/grass4.1/bin   (I usually put grass4.1 and gmake4.1 here...)
  403.               /data
  404.               /dev
  405.               /etc
  406.               /man
  407.               /src
  408.               /src.alpha
  409.               /src.contrib
  410.    
  411.        
  412.        I'm currently building a GRASS5.0 site, which then goes under:
  413.  
  414. /user/grass5/bin
  415.             /data   (some GRASS5 data formats have changed...)
  416.             /dev
  417.             /etc
  418.    
  419.        
  420.        The GRASS Installation Guide (described in Section 10 and in
  421.        Appendix C) is useful for getting GRASS running, even if you
  422.        merely install the binaries as described in Appendices A and B.
  423.        Please don't overlook one important detail: Most GRASS
  424.        installations separate user from software manager accounts and
  425.        UNIX permissions. You should create a "grass" (the quotes here are
  426.        for emphasis, and should not be part of the actual user userid)
  427.        user account on your workstation. All installation and
  428.        configuration of grass should be done by user "grass". Untar (or
  429.        un"cpio" files, run setup configuration utilities, run Gmakefiles
  430.        (GRASS versions of makefiles), and edit configuration files as
  431.        user "grass." Then only RARELY run GRASS as user "grass." (I only
  432.        run GRASS as user "grass" when I am making archival data files in
  433.        the PERMANENT mapset.) This is done for much the same reason as
  434.        not running user software as user "root". YOU CAN DO TOO MUCH
  435.        DAMAGE AS USER "grass"!
  436.        
  437.        Beyond the instructions in these appendices, and information in
  438.        the GRASS Installation Guide, you have some additional
  439.        housekeeping to do, such as developing a data base. You can
  440.        acquire sample data bases from USA/CERL (directory
  441.        pub/grass/grass4.1/data at anonymous "ftp moon.cecer.army.mil"),
  442.        start from scratch following instructions in the GRASS
  443.        Programmer's Manual (and, to a lesser degree, buried in the
  444.        functional descriptions of the GRASS User's Reference Manual).
  445.        
  446.        I personally recommend that you start with the Spearfish and
  447.        Global databases available from USA/CERL:
  448.          1. The Spearfish data base covers two 7.5 minute topographic
  449.             sheets in the northern Black Hills of South Dakota, USA. It
  450.             is in the Universal Transverse Mercator Projection. It was
  451.             originally created by Larry Batten (now of the Environmental
  452.             Systems Research Institute's office in Boulder, Colorado)
  453.             while he was with the U. S. Geological Survey's EROS Data
  454.             Center in South Dakota. The data base was enhanced by
  455.             USA/CERL and cooperators. It is an excellent, and well-used
  456.             (there are many training materials available for GRASS with
  457.             this data base) example of a county-scale GIS project in the
  458.             UTM projection.
  459.          2. The Global data base was developed by Bob Lozar of USA/CERL
  460.             to prototype a latitude-longitude "projection" data base in
  461.             GRASS for global environmental study and decision support.
  462.    
  463.        
  464.        Starting with these two examples, you can build your own data
  465.        bases in UTM and latitude-longitude projections. (Note, many
  466.        people don't call latitude-longitude a projection. Others
  467.        disagree, saying that anything that transfers the Earth's surface
  468.        to two dimensions is a projection.. We'll stay away from that
  469.        debate here. Needless to say, lat-lon is treated as other
  470.        projections are by the computer program.)
  471.        
  472.   7. Web-based Support for GRASS (and for GIS Matters in General)
  473.    
  474.        
  475.        Support for a public domain program? No way, they say! Actually,
  476.        as a user of Linux, you probably know better.
  477.        
  478.        GRASS started by having a GRASS Information Office at USA/CERL.
  479.        There were also very active users outside USA/CERL, who provided
  480.        valuable user support. GRASS had annual users' meetings,
  481.        listservers for users and developers, etc. Companies provided
  482.        value added support services on a contractual or fee basis.
  483.        
  484.        Various people have developed valuable books and training
  485.        materials on GRASS. Several universities used to conduct training
  486.        courses in GRASS. I don't know how many of these are continuing.
  487.        If training courses interest you, try asking on the usenet
  488.        newsgroup comp.infosystems.gis (see below for more on this
  489.        newsgroup).
  490.        
  491.        Valuable "books" available on the Internet are noted in the
  492.        References (Section 10).
  493.        
  494.        World Wide Web-based training materials, including training in
  495.        GRASS, are highlighted in the CyberInstute Short Course in
  496.        GIS:http://www.ngdc.noaa.gov/seg/tools/gis/referenc.html (then
  497.        scan down for the link(s) to Web-based tutorials in GIS).
  498.        
  499.        One of the better GRASS tutorials is Project Assist's - Intro to
  500.        GRASS:http://www.geog.le.ac.uk/assist/grass
  501.        
  502.        Other good sites:
  503.        
  504.        Central Washington University was an early GRASS user and training
  505.        facility:http://www.csu.edu/~gishome/grass.htm
  506.        
  507.        "Starting the hunt for mostly free spatial data" by Stephan
  508.        Pollard:http://cast.uark.edu/local/hunt This is based at the
  509.        Center for Advanced Spatial Technology of the University of
  510.        Arkansas, another early educator with GRASS.
  511.        
  512.        Purdue University has several GRASS
  513.        features:http://pasture.ecn.purdue.edu/~aggrass
  514.        
  515.        USA/CERL's online GRASS
  516.        manual:http://www.cecer.army.mil/grass/userman/main-alpha.html
  517.        
  518.        Rutgers University's GRASS Information
  519.        Center:http://deathstar.rutgers.edu/grassinfo.html
  520.        
  521.        The REGIS project:http://www.regis/berkeley.edu at the University
  522.        of California at Berkeley as a Linux version of GRASS available
  523.        via ftp, and also has a Web-based version of GRASS called
  524.        GRASSLINKS.
  525.        
  526.        After getting trained by the books and Web-based tutorials noted
  527.        just above, where do you turn to for specific advice???
  528.        
  529.        Probably the best source of support these days is usenet newsgroup
  530.        comp.infosystems.gis If you're not familiar with newsgroups, ask
  531.        your network administrator or Internet service provider.
  532.        comp.infosystems.gis contains modestly heavy traffic on such
  533.        topics as
  534.           + "how do I find data on this topic for this area?"
  535.           + "how do I convert these data for use in my Aardvark GIS?"
  536.           + "how do I get this function to work in my Aardvark GIS?"
  537.           + "which GIS can I use to solve my particular problem?"
  538.    
  539.        
  540.        GRASS used to be one of the top GISs discussed on this group.
  541.        Traffic in GRASS is dropping slightly, as its user community
  542.        matures. However, there are usually answers to your questions, if
  543.        you post them. You might also do a "power search" on subject:GRASS
  544.        [& your own subject of interest here?] and
  545.        newsgroup:comp.infosystems.gis in DejaNews:http://www.dejanews.com
  546.        to see what might appear from the usenet archives.
  547.        
  548.   8. The Future of GRASS?
  549.    
  550.        
  551.        Excellent question! Several possible answers have been thrown out:
  552.          1. USA/CERL's announced intention is to use GRASS and COTS
  553.             (commercial off-the-shelf software) for internal uses, to
  554.             leave the GRASS public web- and ftp-site on its system
  555.             indefinitely, and to sign cooperative research and
  556.             development agreements with three companies: (1) the
  557.             Environmental Sciences Research Institute (ESRI), (2)
  558.             Intergraph, and (3) Logiciels et Applications Scientifiques
  559.             (L.A.S.) Inc. The first two agreements encouraged the
  560.             incorporation of GRASS concepts into ESRI's and Intergraph's
  561.             commercial GISs. The third encouraged the adaptation of
  562.             GRASS' concepts and code into a new commercial GIS by L.A.S.
  563.             L.A.S. also offered to encourage the continuation of a public
  564.             domain GRASS, as a viable stand-alone system and as a
  565.             potential source of new ideas and code for L.A.S.'s
  566.             GRASSLAND. One observer noted that the first two agreements
  567.             might be akin to someone signing Linux over to Microsoft. The
  568.             same observer considers the experiment by/with L.A.S. to be
  569.             an interesting possibility - an attempt to keep viable public
  570.             domain and commercial versions of GRASS.
  571.          2. Some people believe that GRASS will wither without USA/CERL's
  572.             central management. Some believe that the Open GIS Consortium
  573.             will successfully guide industry into an open architecture
  574.             that will benefit all developers and users. Others believe
  575.             that OGIS' effort will lead to a cacophony of almost similar
  576.             (but not quite interoperable) vendor-specific "standards," so
  577.             the loss of GRASS as an open development platform will be
  578.             felt sorely.
  579.          3. Some people believe that developments on some campuses and
  580.             other sites may result in those institutes keeping GRASS for
  581.             awhile, but in non-standard forms. In short, GRASS will
  582.             undergo "cell division" and lead to a cacophony of internally
  583.             valuable, but externally unused, GISs.
  584.          4. Others hope that GRASS' previous management model under
  585.             USA/CERL has left it ready for a new model. Perhaps:
  586.               1. Under a new mentor, such as NASA (which needs an open,
  587.                  powerful and scientific, GIS integrated with image
  588.                  processing system for its Earth Observing System).
  589.               2. Under a distributed management model... perhaps somewhat
  590.                  like Linux?
  591.               3. Perhaps a bit of a hybrid? Perhaps a Web-based effort
  592.                  could spawn a series of usenet discussion groups
  593.                  beginning with
  594.                     # comp.infosystems.gis.grass, and evolving to:
  595.                     # comp.infosystems.gis.grass.academics
  596.                     # comp.infosystems.gis.grass.publicservice
  597.                     # comp.infosystems.gis.grass.commercialvalueadded
  598.                     # comp.infosystems.gis.grass.commercialdistributors
  599.                     # comp.infosystems.gis.grass.programming
  600.                     # comp.infosystems.gis.grass.users
  601.                     # comp.infosystems.gis.grass.centralcommittee
  602.              Clearly the topics are a bit tongue-in-cheek. However, under
  603.                  this model, a Central Committee (including
  604.                  representation of academic, public service [government
  605.                  and nongovernmental organizations], commercial
  606.                  distributors and value added firms, programmers, and
  607.                  users) would guide overall grass development and
  608.                  testing. The other special interest groups would serve
  609.                  their user communities. Academics, for example, would
  610.                  involve GIS and GRASS education, but would also try to
  611.                  pull GRASS development in its direction. Value added
  612.                  commercial developers would serve their own interests,
  613.                  including trying to pull GRASS development in a
  614.                  direction that would help their businesses. Users would
  615.                  help each other learn GRASS, develop workarounds to
  616.                  bugs, etc.
  617.    
  618.        
  619.        GRASS offers considerable potential for:
  620.           + Use as a scientific, as well as a traditional graphically
  621.             oriented GIS. Many GISs can make pretty maps. Many of those
  622.             GISs cannot easily perform certain scientific analytical
  623.             functions as easily or powerfully as GRASS. GRASS was
  624.             designed and developed in response to a perceived need for
  625.             scientific GIS, specifically for environmental analysis, and
  626.             the environmental management/protection of public lands.
  627.             Incidentally, there is at least one Web-based GRASS version.
  628.             GRASSLINKS:http://www.regis/berkeley.edu/grasslinks,
  629.             developed at the University of California at Berkeley, uses
  630.             Web forms to submit commands to the server, which creates
  631.             .gif-based display output, places the images into pages, and
  632.             serves them up to the requester. More on that later.
  633.           + Education. GRASS is easier to teach and learn than some other
  634.             GISs. It is easier to modify (for those that want to learn
  635.             GIS as computer science, rather than as "geography") than
  636.             most other GISs that come without source code and treat the
  637.             program as a magical black box. And, of course, it is more
  638.             affordable for the student of GIS than many other GISs.
  639.           + Applications research and development. Many universities have
  640.             used GRASS. Its available source code, easy modification,
  641.             easy scriptability, etc., give it distinct advantages over
  642.             some more closed systems.
  643.           + Public Service. GRASS has been used as a scientific GIS for
  644.             many public service applications. There is considerable value
  645.             in continuing a robust GIS that can ba packaged with any UNIX
  646.             workstation. There is considerably more value if that UNIX
  647.             workstation universe can include Linux (but is not
  648.             constrained only to Linux).
  649.           + GIS research and development. For example - do you want to
  650.             experiment with a different data model? Add it to GRASS!
  651.           + Commercialization. This document gives contact information
  652.             for a commercial version of GRASS. That company (and perhaps
  653.             others?) may welcome your help in enhancing/supporting their
  654.             product.
  655.    
  656.        
  657.        Who would be the Linus Torvelds equivalent in this management
  658.        model? Perhaps no single person. I have been involved in GRASS for
  659.        about a decade, when GRASS was the only GIS that satisfied my
  660.        needs in scientific data management and GIS application. Indeed, I
  661.        had been a dedicated avoider of the user-unfriendly UNIX
  662.        environment until GRASS forced me to learn it. Several senior
  663.        GRASS developers are active in GRASS-related activities and would
  664.        like to see the continued vitality of an open GRASS. It's likely
  665.        that a reborn GRASS would attract a new crop of friends. Thus the
  666.        concept of a "Central Committee" to collectively lead GRASS'
  667.        transition to a more open management and development style.
  668.        
  669.        In short, the Linux community has an opportunity to take under its
  670.        wing a killer ap. GRASS' current public domain status is slightly
  671.        different from Linux's. However, that status could be
  672.        discussed....
  673.        
  674.        Comments would be appreciated!
  675.        
  676.   9. Copyright Notice, and Notice on Support of this Document
  677.    
  678.        
  679.        Copyright notice:
  680.        
  681.        This document was prepared by a Federal civil servant in support
  682.        of his work (but mostly on his own time). It is NOT SUBJECT TO
  683.        COPYRIGHT.
  684.        
  685.        Notice on support of this document:
  686.        
  687.        I believe that the contents of this document are accurate.
  688.        However, if you use this document, you accept the risks for any
  689.        errors in this document (and in any documents that are cited
  690.        here).
  691.        
  692.        I would greatly appreciate help in correcting any errors, or in
  693.        enhancing this document. However, "my time is limited" in dealing
  694.        with this issue. Any help that you can provide, that also helps me
  695.        to more efficiently respond to your interest, is more likely to be
  696.        responded to quickly. A complaint might be appreciated, but a
  697.        suggested improvement that includes draft wording might be REALLY
  698.        appreciated.
  699.        
  700.   10. References
  701.    
  702.        
  703.        For general reference material on GIS, try a very good technical
  704.        bookstore (in many cases these are campus bookstores at schools
  705.        with good GIS programs or top-notch technical or general
  706.        bookstores - you know that ones are near you..), or the following
  707.        URL for the CyberInstitute Short Course on Geographic Information
  708.        Systems:hQfttp://www.ngdc.noaa.gov/seg/tools/gis/referenc.html
  709.        (convened by myself):
  710.        
  711.        Also check
  712.        Baylor University's growing GRASS Home
  713.        Page:http://www.baylor.edu/~grass
  714.        USA/CERL's GRASS Home Page:http://www.cecer.army.mil/grass
  715.        
  716.        For a good collection of references on GRASS, try this procedure,
  717.        to load up on reference goodies from USA/CERL:
  718.  
  719.  
  720.   ftp moon.cecer.army.mil
  721.   login: anonymous
  722.   password: your email address
  723.   cd pub/grass/grass4.1/outgoing
  724.   image
  725.   get grassman.ps.Z  (or grassman.txt.Z, or grassman.wp.Z)
  726.   cd ../documents/programmer/postscript
  727.   image
  728.   get progman.ps.Z
  729.   cd ../../user/postscript
  730.   image
  731.   get refman.ps.Z
  732.   cd ../..
  733.   image
  734.   get installGuide.ps.Z
  735.   bye
  736.  
  737.   uncompress grassman.ps.Z
  738.   uncompress progman.ps.Z
  739.   uncompress refman.ps.Z
  740.   uncompress installGuide.ps.Z
  741.  
  742.   lpr *.ps   (or whatever is appropriate for your environment)
  743.    
  744.        
  745.        installGuide => The GRASS Installation Guide (you need this to
  746.        compile GRASS source code)
  747.        grassman => The GRASS Beginner's Manual (intro to GRASS)
  748.        refman => The GRASS User's Reference Manual (function guide)
  749.        progman => The GRASS Programmer's Manual (and administrator's
  750.        guide - this is valuable for info about data formats, etc.)
  751.        
  752.        Browse around the ftp site noted just above, and you may find more
  753.        stuff of interest. Particularly in the
  754.        pub/grass/grass4.1/documents directory, there are tutorials on
  755.        advanced GRASS functions such as r.mapcalc (think of this as math
  756.        applied to raster arrays), r.combine and r.weight (think of this
  757.        as how to combine spatial submodels into one type of model), and
  758.        others.
  759.        
  760.        Incidentally, do you prefer German? Try The University of
  761.        Hannover's site:http://www.laum.uni-hannover.de/iln/grass/handbuch
  762.        
  763.          _____________________________________________________________
  764.        
  765.   Appendix A: Acquisition/Installation of GRASS4.13 Binaries
  766.    
  767.        
  768.        This appendix describes how to acquire and install Linux binaries
  769.        for GRASS4.13 (the 3rd update to the last full release of GRASS,
  770.        version 4.1).
  771.        
  772.        How to get these files:
  773.  
  774.  
  775.   ftp moon.cecer.army.mil
  776.   login: anonymous
  777.   password: your email address
  778.   cd pub/grass/grass4.1/release/binaries/linux
  779.   image
  780.   mget grassa*
  781.   bye
  782.  
  783. Installation instructions:
  784. ********************************************************************
  785. * GRASS 4.1 Update 3 for Linux
  786. *
  787. * This package contains GRASS programs only, *NO* GIS
  788. * data is included.  You can find example GRASS data at
  789. * moon.cecer.army.mil
  790. *
  791. * Compiled by: Andy Burnett - burnett@zorro.cecer.army.mil
  792. * compiled on: April 7, 1994
  793.  
  794. ********************************************************************
  795. System Requiremnts:
  796.  
  797.         35 MB disk space to hold the binary distribution
  798.  
  799. System library requirements:
  800.  
  801.         libc4.5.21 or greater
  802.  
  803.         libX.so.3.1.0 or greater
  804.  
  805. If you are running libraries that are older than these, this binary
  806. distribution will *NOT* run on your linux system.
  807.  
  808. --------------------------------------------------------------------------
  809. Files in this release:
  810.  
  811.         README_4.1.3            what you are currently reading
  812.         ginstall                simple grass installation script
  813.         grassaa --------|
  814.         grassab         |
  815.         grassac         |
  816.         grassad         |
  817.         grassae         |--     the linux GRASS binaries
  818.         grassaf         |
  819.         grassag         |
  820.         grassah         |
  821.         grassai         |
  822.         grassaj         |
  823.         grassak --------|
  824.  
  825. INSTALLATION:
  826.  
  827.         To install this binary distribution of grass for linux, you
  828. can simply run the ginstall script or you can unpack the files by
  829. hand.  I recommend using the ginstall script ... it's very simple and
  830. should be bullet proof.  To run the ginstall script, you will need
  831. gawk (gnu awk) installed on your system and it needs to be in your
  832. PATH.
  833.  
  834. If, however, you want to do things by hand, here's what you need to
  835. do:
  836.  
  837. o  make the destination directory (/usr/grass, /usr/local/grass,
  838.    whatever)  This will become your GISBASE for grass.
  839.  
  840. ********************* LOOK HERE **************************************
  841. from here on, replace $GISBASE with the name of the directory you just
  842. created
  843. ********************* LOOK HERE **************************************
  844.  
  845. o  cat grassa? | gzip -d | (cd $GISBASE; tar xvf -)
  846.    This will unpack all the grass binaries into the $GISBASE directory
  847.  
  848. o  copy $GISBASE/etc/moncap.sample to $GISBASE/etc/monitorcap and edit
  849.    it.
  850. o  change all occurrences of GBASE in that file to $GISBASE
  851. o  copy $GISBASE/etc/grass4.1 into a public directory (I suggest
  852.    /usr/bin)
  853. o  edit the copy you just made:
  854.    change all occurrences of GBASE to $GISBASE
  855.    
  856.          _____________________________________________________________
  857.        
  858.   Appendix B: Acquisition/Installation of GRASS4.1.5 Binaries
  859.    
  860.        
  861.        This appendix describes how to acquire and install Linux binaries
  862.        for GRASS4.15 (the 5th and last update to the last full release of
  863.        GRASS, version 4.1).
  864.        
  865.        How to get these files:
  866.  
  867.  
  868. ftp moon.cecer.army.mil
  869. login: anonymous
  870. password: your email address
  871. cd pub/grass/grass4.1/release/binaries/linux
  872. image
  873. mget linuxa*
  874. bye
  875.  
  876. Installation instructions:
  877. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  878. Files in this release:
  879.         README_4.1.5            what you are currently reading
  880.         install.sh                simple grass installation script
  881.         linuxaa --------|
  882.         linuxab         |
  883.         linuxac         |
  884.         linuxad         |
  885.         linuxae         |--   the linux GRASS binaries, version 4.1.5
  886.         linuxaf         |
  887.         linuxag         |
  888.         linuxah         |
  889.         linuxai --------|
  890.  
  891. * * * * * * * * * * *** * * * * * * * * * * * * * * * * * * * * * * *
  892. *
  893.  
  894. The GRASS4.15 for Linux was compiled in my Linux box with the
  895. following configuration:
  896.         Slackware 3.0
  897.         kernel 1.2.13
  898.         gcc 2.7.0
  899.         libc 5.0.9
  900.         flex 3.5.2
  901.  
  902. ~ ~ ~ ~ ~ ~ ~
  903. ~ IMPORTANT: ~
  904. ~ ~ ~ ~ ~ ~ ~
  905. THE LINUX GRASS 4.15 BINARIES ONLY WORK ON ELF-LINUX. THE BINARIES MAY
  906. NOT WORK WITH EARLY VERSION OF KERNEL AND/OR GCC AND FLEX.
  907.  
  908. The binaries was tared and gziped, then split into 9 (close to 1.3 MB
  909. - 1200 x 1K block) files named from linuxg.aa to linuxg.ai.
  910.  
  911. You should ftp all the linuxg.a* in binary mode and also get this
  912. readme file and an installation script - install.sh.  Please put all
  913. of these files in the same directory - source directory.
  914.  
  915. At the source directory under the UNIX prompt, type
  916.         sh ./install.sh full_path_to_the_destination_directory
  917.  
  918. and it should automatically unzip and untar the linuxg.a* files to the
  919. destination directory and also edit several site-specific files.  The
  920. total space your need is about 26 MB.
  921.  
  922. At the destination directory, your can find the grass4.1 script.  It
  923. should have been modified to reflect your installation directory.
  924. Now, either move/copy the grass4.1 file to one of your PATH or use the
  925. link command as below:
  926.         cd /usr/local/bin
  927.         ln -s destination_directory/etc/grass4.1 grass4.1
  928.  
  929. Now, your are ready to start GRASS by typing grass4.1 and you should
  930. know how to run GRASS afterward.
  931.  
  932. There is a readme directory in the destination_directory/etc
  933. directory.  This directory has several readme files that come with
  934. some incoming commands.  You can find all the compiled commands of
  935. this binaries in the commands.readme file.  I can't guarantee that all
  936. of them work but I have tested lots of them.  If you find some
  937. commands that don't work, please post a message on the grass user
  938. group and we can solve it all together.
  939.  
  940. Yung-Tsung Kang,
  941. Michigan State University
  942.    
  943.          _____________________________________________________________
  944.        
  945.   Appendix C: Acquisition/Compilation of GRASS Source Code
  946.    
  947.        
  948.        The GRASS binaries for Linux tend to work. Why would anyone want
  949.        to mess with the source code?
  950.        
  951.        Let's try to answer this with another question: "Why can't I get
  952.        the source code to my GIS, so I can see how it works, and maybe
  953.        fix some things to work the way I like them?" (You probably know
  954.        the answers to this question, at least for many commercial
  955.        software packages.)
  956.        
  957.        If you want to
  958.          1. Add any of the numerous existing alpha and contributed GRASS
  959.             functions,
  960.          2. Understand how a function works (did any programming
  961.             shortcuts or performance enhancements affect the accuracy of
  962.             a function? Can I improve the performance of a function?)
  963.          3. Revise or enhance the code (if you do this, please see
  964.             Appendix D!),
  965.          4. Try compiling several tens of megabytes of source code, this
  966.             appendix is for you. Also check Appendix E.
  967.    
  968.        
  969.        First, you need to acquire the source code, and the GRASS
  970.        Installation Guide. You may also want to get the GRASS
  971.        Programmer's Manual and User's Reference Manual. To do this:
  972.  
  973.  
  974. ftp moon.cecer.army.mil
  975. login: anonymous
  976. password: your email address
  977. cd pub/grass/grass4.1/release/source
  978. get README.4
  979. get README.5
  980. image
  981. mget s4* (or s5*, your choice)
  982. cd ../../documents
  983. get installGuide.ps.Z
  984. cd /manuals/programmer/postscript
  985. get progman.ps.Z
  986. cd ../../user/postscript
  987. get refman.ps.Z
  988. bye
  989.    
  990.        
  991.        Don't forget this site. There are several tutorials on some of
  992.        GRASS' more advanced programs in the pub/grass/grass4.1/document
  993.        directory. There are two options for source code (I'm only
  994.        discussing GRASS version 4.14 here, though version 4.15 is also
  995.        available) The pub/grass/outgoing directory contains many
  996.        contributed functions (and many other candidates for enhancing
  997.        your system).
  998.        
  999.        Follow the README.4 file for installing GRASS version 4.14 (which
  1000.        is sometimes called version 4.1.4) source code. Follow the
  1001.        README.5 file for installing GRASS version 4.15 (which is
  1002.        sometimes called version 4.1.5) source code.
  1003.        
  1004.        After installing the source code, uncompress and print
  1005.        installGuide.ps.Z (or the troff version, if you prefer that and
  1006.        got it from a neighboring directory). You might also want to
  1007.        uncompress and print refman.ps.Z and progman.ps.Z at the same
  1008.        time. Note that progman.ps.Z is called the programmer's manual,
  1009.        but also contains valuable information about data formats and
  1010.        directory structures. Advanced users may also want to know the
  1011.        GRASS system utilities, even if they won't be calling them in
  1012.        code.
  1013.        
  1014.        Now, use the GRASS Installation Guide (from installGuide.ps.Z) to
  1015.        guide yourself through the installation. The thickness of this
  1016.        document may at first be intimidating. However, if you installed
  1017.        Linux yourself, you should be ready to tackle a GRASS
  1018.        installation. Don't be surprised if a function or two does not
  1019.        compile on your system. I have a couple of uncompiled functions on
  1020.        my own Linux system. Fortunately, these are functions that I don't
  1021.        use... Some day I'll get back to them, fix them, and compile
  1022.        them!?
  1023.          _____________________________________________________________
  1024.        
  1025.        
  1026.        
  1027.        Here is a late-breaking addition, on how to install the newly
  1028.        released GRASS 4.2 from Baylor
  1029.        University:http://www.baylor.edu/~grass This text is as provided
  1030.        by Baylor, unedited by myself due to its release only a few days
  1031.        ago. Please note the similarity with other installations..
  1032.        
  1033.     GRASS 4.2 Quick Start
  1034.     Installtion Instuctions
  1035.    _WARNING:_ These instructions pertain to the 4.2 release of GRASS
  1036.        Users are urged to consult the complete installation guide for
  1037.        more detailed instructions.
  1038.        
  1039.        _$GIS/src_ - This directory contains scripts and files used to
  1040.        compile GRASS. By running scripts and changing lists of programs
  1041.        you generate GRASS binaries for your system.
  1042.        
  1043.        You may mount a disk containing GRASS source on different types of
  1044.        machines and compile without making source code copies. You follow
  1045.        the following instructions for each machine.
  1046.        
  1047.        _WARNING:_ These instructions presume that you have familiarity
  1048.        with UNIX, C, make, and shell scripting. Murphy's law visits GRASS
  1049.        regularly and your expertise in these matters will be the best
  1050.        defense against Mr. Murphy.
  1051.        
  1052.        _WARNING:_ These instructions and scripts have been used to
  1053.        compile GRASS on various machines. Please mail results of using
  1054.        this information for compiling GRASS on your platforms and
  1055.        operating system to:
  1056.        
  1057.        grass@baylor.edu
  1058.        
  1059.        _DIRECTORY CONTENTS_
  1060.        
  1061.  
  1062.     GISGEN      script which will compile GRASS
  1063.  
  1064.     MAKELINKS   script used after GISGEN to establish the user executable
  1065.                 commands
  1066.  
  1067.     VERSION     current version number and date of the GRASS release
  1068.  
  1069.     generic/    system independent files need by gmake
  1070.                   gmake     shell script which does compilations
  1071.                   make.def  make variables
  1072.                   make.tail some additional make rules
  1073.  
  1074.     head/       gmake header file(s) for this site.  Header files are
  1075.                   created by running the utils/setup command.
  1076.  
  1077.     lists/      lists of programs to be compiled
  1078.                   GRASS     standard GRASS programs
  1079.                   local     site specific GRASS programs
  1080.                   ...       architecture dependent GRASS programs
  1081.  
  1082.     next_step/  files used by GISGEN to keep track of how far along
  1083.                 it is in the compilation. Used to restart
  1084.                 GISGEN (after a failure) where it left off.
  1085.  
  1086.     utils/      contains the 'setup' script and all support scripts
  1087.                 and files needed by 'setup'
  1088.  
  1089.    
  1090.        
  1091.        _COMPILATION STEPS OVERVIEW_
  1092.        
  1093.  
  1094.  (1) Generate files that contain location and machine specific make
  1095.     information.
  1096.  
  1097.  (2) Edit files containing lists of location and machine specific
  1098.      programs to be compiled (generally printer, digitizer, and graphics
  1099.      drivers).
  1100.  
  1101.  (3) Run GRASS compilation script
  1102.  
  1103.  (4) Run GRASS program linking script
  1104.  
  1105.  (5) Edit device driver configuratin files
  1106.  
  1107.  (6) Compile GRASS contributed, alpha programs.
  1108.  
  1109.  (7) Compile GRASS related and hybrid programs.
  1110.    
  1111.        
  1112.        _COMPILATION STEPS (DETAILS) _
  1113.        
  1114.        _(1) Generate make support files_
  1115.        
  1116.        Each machine and location needs to have GRASS compiled in ways
  1117.        that specify different:
  1118.           + compilation and load flags
  1119.           + system libraries
  1120.           + installation directories
  1121.           + default data bases and locations
  1122.    The shell script utils/setup assists you in define many of the make
  1123.        options and definitions that will become part of every
  1124.        compile-time generated makefile (about 350). It also creates your
  1125.        shell script for compiling individual GRASS programs - gmake4.2.
  1126.        
  1127.        Run "utils/setup" and answer the questions.
  1128.        
  1129.        The makefile portions are placed in the head/ under a name which
  1130.        you specify/approve in the utils/setup process. The executable
  1131.        shell script which directs compilation is placed in (by default)
  1132.        /usr/local/bin.
  1133.        
  1134.        Examine the just created file in head/ to make sure things are ok.
  1135.        A brief description for each defined variable follows:
  1136.        
  1137.  
  1138.   ARCH            = Key name identifying the architecture of the machine
  1139.                     on which you are compiling GRASS.
  1140.   GISBASE         = Directory into which compiled GRASS will be contained
  1141.   UNIX_BIN        = Local directory where the GRASS entry program and gmake
  1142.                     will be contained
  1143.  
  1144.   DEFAULT_DATABASE= Directory where local GRASS data bases are contained
  1145.   DEFAULT_LOCATION= GRASS data base that users get as the first default
  1146.  
  1147.   COMPILE_FLAGS   = Compilation flags
  1148.   LDFLAGS         = Load flags
  1149.  
  1150.   TERMLIB         = System library containing low-level cursor movement
  1151.   CURSES          = System library that supports screen cursor control
  1152.   MATHLIB         = System math library
  1153.   LIBRULE         = Method for archiving and randomizing libraries
  1154.  
  1155.   USE_TERMIO      = Flag to use the termio library if available
  1156.   USE_MTIO        = Flag to use the mtio library if available
  1157.   CAN_CLEAR       = Flag indicating that the terminal screen can be cleared
  1158.   DIGITFLAGS      = Flags to set owner and priority of the v.digit program
  1159.    
  1160.        
  1161.        _(2) Edit files containing lists of location and machine specified
  1162.        programs_
  1163.        
  1164.        The directory lists/ contains files that list directories that
  1165.        will be compiled. Directory names are relative to the GRASS src
  1166.        directory. The file lists/GRASS lists all basic GRASS programs
  1167.        that get compiled at every site. The file lists/local and
  1168.        lists/$ARCH.
  1169.  
  1170.     -----------------------------------------------------------------
  1171.     $ARCH is the architecture name you approved while running the
  1172.     utils/setup script.  You can determine this by running:
  1173.         gmake4.2 -sh | grep ARCH
  1174.     -----------------------------------------------------------------
  1175.    There man not be a lists/$ARCH file, but you are free to create it to
  1176.        add names of programs you want compiled specifically for this
  1177.        architecture. It is an architecture-specific list which allows NFS
  1178.        linked source code to compile one set of programs for one machine,
  1179.        and another set for another machine. All machines that share the
  1180.        same source code via NFS mounts will compile the directories
  1181.        listed in lists/local.
  1182.        
  1183.        All lists may contain comment lines - indicated by a # as the
  1184.        first character in the line. The lists/local file contains lists
  1185.        of all digitizer, graphics, and paint (hard-copy map) drivers. All
  1186.        machine specific devices are commented out - you must uncomment
  1187.        those that are particular to your site or architecture. You are
  1188.        encouraged to move the graphics driver items to the appropriate
  1189.        lists/$ARCH file.
  1190.        
  1191.        _(3) Run GRASS compilation program_
  1192.        
  1193.        The script GISGEN drives the compilation process. If all goes well
  1194.        you will be able to simply enter the command GISGEN and wait. The
  1195.        entire compilation process takes from about 1/2 hour on the faster
  1196.        workstations to about 8 hours on the slower workstations.
  1197.        
  1198.        GISGEN collects all of the directory names to be compiled from
  1199.        lists/GRASS lists/$ARCH and lists/local and begins running
  1200.        gmake4.2 in each directory. Screen output is a collection of
  1201.        messages from GISGEN and from the UNIX make program. Failure at
  1202.        any step will halt compilation. On failure you might do one of the
  1203.        following things:
  1204.        
  1205.  
  1206.   1 - Fix a compilation problem by modifying code in the directory that
  1207.       failed.  After modification, return to this directory and rerun
  1208.       GISGEN.  Compilation will pick up at the failed directory and continue
  1209.       down the list of directories if successful.
  1210.  
  1211.   2 - Restart GISGEN.  If the failure requires modifications to code already
  1212.       compiled, or the compilation options you set in step 1, you must
  1213.       remove next_step/$ARCH (or next_step/next_step if ar architecture name
  1214.       was not specified in step 2.  You may then rerun GISGEN.
  1215.  
  1216.   3 - Skip the failed directory.  In this case you must seek through the
  1217.       files list/GRASS lists/$ARCH and lists/local to determine the directory
  1218.       name that follows the failed directory name.  The failed name is in
  1219.       next_step/$ARCH and must be replaced in that file with the next name.
  1220.       After editing, rerun GISGEN
  1221.    
  1222.        
  1223.        When complete GISGEN will put the word DONE into the next_step
  1224.        file and will print the phrase "DONE generating GIS binary code"
  1225.        to the screen.
  1226.        
  1227.        _(4) Run GRASS program linking script_
  1228.        
  1229.        The GISGEN directs a compilation process that stashes the GRASS
  1230.        programs away in directories unavailable to the user community.
  1231.        Most user commands are actually links to a single program called
  1232.        "front.end". Links to this program must be made for every actual
  1233.        GRASS program. This is done AFTER GISGEN is finished. To make (or
  1234.        re-make) links for all user programs run the script MAKELINKS.
  1235.        
  1236.        _(5) Edit device driver configuratin files_
  1237.        
  1238.        Your compiled system may any combination of several graphics,
  1239.        paint, and digitizer drivers. Refer to the GRASS installation
  1240.        instructions for details.
  1241.        
  1242.        NOTE: If you have trouble compiling your graphics driver, go to
  1243.        the directory $GIS/src/display/devices and compile the proper
  1244.        drivers manually using gmake4.2.
  1245.        
  1246.        _(6) Compile GRASS contributed, alpha programs._
  1247.        
  1248.        GRASS programs come in three flavors:
  1249.        
  1250.        MAIN - The programs are those compiled in step 3. They have stood
  1251.        the test of time and are generally reliable programs.
  1252.        
  1253.        ALPHA - Alpha programs are intended to be included with the MAIN
  1254.        programs in the next release.
  1255.        
  1256.        CONTRIB - Sites generate lots of special purpose programs in GRASS
  1257.        to get some job done, but do not polish the effort sufficiently to
  1258.        even be considered alpha code can be distributed in this category.
  1259.        
  1260.        
  1261.        ALPHA programs are found in the directory src.alpha. You, the
  1262.        installer may visit these programs and compile any that you
  1263.        desire. In directories that contain Gmakefile files, simply run:
  1264.        gmake4.2
  1265.        
  1266.        CONTRIB programs are in the directory src.contrib. The state of
  1267.        these programs are varied. Some programs may compile with
  1268.        gmake4.2; others are suitable as a starting point for programmers
  1269.        who will be writing new software.
  1270.        
  1271.        _(7) Compile GRASS related and hybrid programs._
  1272.        
  1273.        The GRASS user community has discovered that there are several
  1274.        public-domain programs that are very useful in conjunction with
  1275.        GRASS. These are found in the directory src.related. Compile these
  1276.        programs based on instructions (or lack of instructions) in the
  1277.        individual directories.
  1278.        
  1279.        Hybrid programs are those that mix the capabilities of GRASS with
  1280.        the capabilities of one or more of the "related" programs. These
  1281.        are found in the src.garden directory. They require successful
  1282.        compilation of the "related" programs and generally compile using
  1283.        the gmake4.2 and the included Gmakefile files.
  1284.          _____________________________________________________________
  1285.        
  1286.        
  1287.        
  1288.        The rest of the compilation should just take some time. If you
  1289.        have already installed GRASS binaries, you should back up your
  1290.        system (or at least get the working binaries out of the way of
  1291.        your compilation!).
  1292.        
  1293.        Good Luck! And be secure in the likelihood that you can use the
  1294.        compiled binaries if you bail out of a full compilation of the
  1295.        source code.
  1296.          _____________________________________________________________
  1297.        
  1298.   Appendix D: If you plan to enhance any part of GRASS, read this first!
  1299.    
  1300.        
  1301.        GRASS has been developed for over a decade as completely
  1302.        unrestricted public domain source code and executables. Though
  1303.        there was initial resistance to the existence of such robust
  1304.        software in the public domain, many competitors learned to take
  1305.        advantage of GRASS. It has reputedly been the intellectual
  1306.        stimulus for several enhancements to other GISs. Several companies
  1307.        conducted business by installing and customizing public domain
  1308.        GRASS for customers, and by providing other value-added services
  1309.        such as data base development.
  1310.        
  1311.        As USA/CERL no longer supports the public version of GRASS, users
  1312.        are free to use what currently exists. They're also currently
  1313.        completely on their own. At least where the public domain version
  1314.        is concerned.
  1315.        
  1316.        There is a commercial version of
  1317.        GRASS:http://www.las.com/grassland, adapted from the public domain
  1318.        version by Logiciels et Applications Scientifiques (L.A.S) Inc. of
  1319.        Montreal . In a recent check, LAS sold its GRASSLAND for Sun,
  1320.        Linux and Windows NT. LAS is trying to encourage the continuation
  1321.        of a robust public domain Linux, partly as a source of new ideas
  1322.        and code for their own developments.
  1323.        
  1324.   Appendix E: Example Linux versions of some critical GRASS files.
  1325.    
  1326.        
  1327.        This appendix is the home of Linux-specific examples of selected
  1328.        GRASS configuration files. Currently, only several examples of a
  1329.        single file are offered. However, this is the most important file
  1330.        for configuration! Later, examples of database configuration files
  1331.        (e.g. DEFAULT_WIND) and other files may appear.
  1332.        
  1333.        In the Installation Guide (pp. 10-11) you will see mention of the
  1334.        [header] file in directory $GIS/src/CMD/header (where $GIS is the
  1335.        directory in which you place GRASS - some folks put this in
  1336.        /usr/local - I put everything in a GRASS' own filesystem/directory
  1337.        /user/grass4.1). The installation guide favors Sun systems, as
  1338.        these were the development environment for GRASS4. (In case you
  1339.        cared, Masscomp workstations were earlier development
  1340.        environments.) Below are examples of this file for linux (which
  1341.        you might want to name linux in your $GIS/src/CMD/header
  1342.        directory. You may want to refer to this section when running the
  1343.        setup ($GIS/src/CMD/utils/setup) command.
  1344.          _____________________________________________________________
  1345.        
  1346.        
  1347.        
  1348.        One version:
  1349.  
  1350. CC                  = gcc
  1351. ARCH                =
  1352.  
  1353. GISBASE             = /user/grass4.1
  1354. UNIX_BIN            = /user/grass4.1/bin
  1355.  
  1356. DEFAULT_DATABASE    = /user/grass4.1/data
  1357. DEFAULT_LOCATION    = china
  1358.  
  1359. COMPILE_FLAGS       = -O2
  1360. LDFLAGS             = -s
  1361.  
  1362. XCFLAGS             = -D_NO_PROTO -DXM_1_1_BC
  1363. XLDFLAGS            =
  1364. XINCPATH            =
  1365. XMINCPATH           =
  1366. XLIBPATH            =
  1367. XTLIBPATH           = -L/usr/lib
  1368. XMLIBPATH           = -L/usr/lib
  1369. XLIB                = -lX11
  1370. XTLIB               = -lXt
  1371. XMLIB               = -lXm
  1372. XEXTRALIBS          =
  1373.  
  1374. TERMLIB             =
  1375. CURSES              = -lcurses $(TERMLIB)
  1376. MATHLIB             = -lm
  1377.  
  1378. #                   LIBRULE = ar ruv $@ $?
  1379. #                   LIBRULE = ar ruv $@ $?; ranlib $@
  1380. #                   LIBRULE = ar ruv $@ $?; ar ts $@
  1381. #                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
  1382. LIBRULE             = ar ruv $@ $?
  1383.  
  1384. USE_TERMIO          = -DUSE_TERMIO
  1385. USE_MTIO            = -DUSE_MTIO
  1386. USE_FTIME           = -DUSE_FTIME
  1387. DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
  1388. VECTLIBFLAGS        =
  1389. GETHOSTNAME         = -DGETHOSTNAME_OK
  1390.    
  1391.          _____________________________________________________________
  1392.        
  1393.        Another version:
  1394.  
  1395. #CC                  = gcc
  1396. #CC                  = gcc -ggdb -traditional
  1397. CC                  = gcc -traditional
  1398. #CC                  = gcc -static
  1399.  
  1400. ARCH                = linux
  1401.  
  1402. GISBASE             = /usr2/local/grass/grass4.1
  1403. UNIX_BIN            = /usr/local/bin
  1404.  
  1405. DEFAULT_DATABASE    = /usr2/local/grass
  1406. DEFAULT_LOCATION    = grass4.1
  1407.  
  1408. COMPILE_FLAGS       =
  1409. #COMPILE_FLAGS       = -O
  1410. LDFLAGS             = -s
  1411.  
  1412. XCFLAGS             = -D_NO_PROTO
  1413. XLDFLAGS            =
  1414. XINCPATH            = -I$GISBASE/xgrass
  1415. #XINCPATH            =
  1416. XMINCPATH           =
  1417. XLIBPATH            = -L/usr/lib
  1418. XTLIBPATH           = -L/usr/lib
  1419. XMLIBPATH           = -L/usr/lib
  1420. XLIB                = -lX11
  1421. XTLIB               = -lXt
  1422. XMLIB               = -lXm
  1423. XEXTRALIBS          =
  1424.  
  1425. TERMLIB             =
  1426. CURSES              = -lcurses $(TERMLIB)
  1427. MATHLIB             = -lm
  1428.  
  1429. #                   LIBRULE = ar ruv $@ $?
  1430. #                   LIBRULE = ar ruv $@ $?; ranlib $@
  1431.  
  1432. #                   LIBRULE = ar ruv $@ $?; ar ts $@
  1433. #                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
  1434. LIBRULE             = ar ruv $@ $?; ranlib $@
  1435.  
  1436. USE_TERMIO          = -DUSE_TERMIO
  1437. USE_MTIO            = -DUSE_MTIO
  1438. USE_FTIME           = -DUSE_FTIME
  1439. DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
  1440. VECTLIBFLAGS        =
  1441. GETHOSTNAME         = -DGETHOSTNAME_OK
  1442.    
  1443.          _____________________________________________________________
  1444.        
  1445.        
  1446.        
  1447.        Another version:
  1448.  
  1449. #CC                  = gcc -traditional -ggdb
  1450. CC                  = gcc -traditional -m486
  1451. #CC                  = gcc
  1452. ARCH                = linux
  1453.  
  1454. GISBASE             = /usr/local/grass/grass4.1
  1455. UNIX_BIN            = /usr/local/bin
  1456.  
  1457. DEFAULT_DATABASE    = /usr/local/grass
  1458. DEFAULT_LOCATION    = grass4.1
  1459.  
  1460. COMPILE_FLAGS       = -O2
  1461. LDFLAGS             = -s
  1462.  
  1463. XCFLAGS             = -D_NO_PROTO -DXM_1_1_BC
  1464. XLDFLAGS            =
  1465. XINCPATH            =
  1466. XMINCPATH           =
  1467. XLIBPATH            = -L/usr/lib
  1468. XTLIBPATH           = -L/usr/lib
  1469. XMLIBPATH           = -L/usr/lib
  1470. XLIB                = -lX11
  1471. XTLIB               = -lXt
  1472. XMLIB               = -lXm
  1473. XEXTRALIBS          = -lXmu
  1474.  
  1475. TERMLIB             =
  1476. CURSES              = -lcurses $(TERMLIB)
  1477. MATHLIB             = -lm
  1478.  
  1479. #                   LIBRULE = ar ruv $@ $?
  1480. #                   LIBRULE = ar ruv $@ $?; ranlib $@
  1481. #                   LIBRULE = ar ruv $@ $?; ar ts $@
  1482. #                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
  1483. LIBRULE             = ar ruv $@ $?; ranlib $@
  1484.  
  1485. #USE_TERMIO          = #-DUSE_TERMIO
  1486. USE_TERMIO          = -DUSE_TERMIO
  1487. USE_MTIO            = -DUSE_MTIO
  1488. USE_FTIME           = -DUSE_FTIME
  1489. DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
  1490. VECTLIBFLAGS        =
  1491. GETHOSTNAME         = -DGETHOSTNAME_OK
  1492.    
  1493.          _____________________________________________________________
  1494.        
  1495.        
  1496.        
  1497.        Yet another version:
  1498.  
  1499. CC                  = cc
  1500. ARCH                = linux
  1501.  
  1502. GISBASE             = /usr/local/grass4.15/linux
  1503. UNIX_BIN            = /usr/local/grass4.15/linux
  1504.  
  1505. DEFAULT_DATABASE    = /data/grassdata
  1506. DEFAULT_LOCATION    =
  1507.  
  1508. # -fwritable-strings - for ps.map only
  1509. #COMPILE_FLAGS       = -O -m486 -fwritable-strings
  1510. COMPILE_FLAGS       = -O -m486
  1511. LDFLAGS             = -s
  1512.  
  1513. XCFLAGS             = -D_NO_PROTO
  1514. XLDFLAGS            =
  1515. XINCPATH            =
  1516. XMINCPATH           =
  1517. XLIBPATH            = -L/usr/X11R6/lib
  1518. XTLIBPATH           = -L/usr/lib
  1519. XMLIBPATH           = -L/usr/lib
  1520. XLIB                = -lX11
  1521. XTLIB               = -lXt
  1522. XMLIB               = -lXm
  1523. XEXTRALIBS          =
  1524.  
  1525. TERMLIB             =
  1526. CURSES              = -lcurses $(TERMLIB)
  1527. MATHLIB             = -lm
  1528.  
  1529. #                   LIBRULE = ar ruv $@ $?
  1530. #                   LIBRULE = ar ruv $@ $?; ranlib $@
  1531. #                   LIBRULE = ar ruv $@ $?; ar ts $@
  1532. #                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
  1533. LIBRULE             = ar ruv $@ $?
  1534.  
  1535. USE_TERMIO          = -DUSE_TERMIO
  1536. USE_MTIO            = -DUSE_MTIO
  1537. USE_FTIME           = -DUSE_FTIME
  1538. DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
  1539. VECTLIBFLAGS        = -DPORTABLE_3
  1540. GETHOSTNAME         = -DGETHOSTNAME_OK
  1541.    
  1542.        
  1543.        Intimidating? It probably shouldn't be if you've configured X
  1544.        Windows on your Linux box. These examples should give you patterns
  1545.        to look for when running the setup utility in GRASS (described in
  1546.        the Installation Guide).
  1547.