.TH s.menu .SH NAME \fIs.menu\fR \- Accesses and manipulates GRASS site location data. .br .I "(GRASS Sites Program)" .SH SYNOPSIS .B s.menu .SH OVERVIEW The \fIs.menu\fR program provides the user with the capability of interfacing site location data with the geographic data in raster map layers. Two types of spatial analysis reports on sites can be generated, and an interface to the "S" statistical package is provided. .SH DESCRIPTION The \fIs.menu\fR program is an interface to functions that allow the user to manipulate GRASS site "lists". A site list is a list of eastings and northings describing the location of some point feature. It can also contain a category value and category label for each site location. The program is interactive. After typing \fBs.menu\fR on the command line, the user selects site functions from a menu. The main menu is shown below: .in +3 .NF SITES MAIN MENU (current list: no sites) LOCATION: spearfish REGION 4928000.00(N) 4914000.00(S) 100.00 (RES) MAPSET: PERMANENT 609000.00(E) 590000.00(W) 100.00 (RES) MASK: none Please select one of the following 1 Read an existing site list 2 Mask current site list 3 Save the current site list in your mapset 4 Check site list for duplicate sites 5 Edit site list using a UNIX editor 6 Convert site list to raster file (0/1) 7 Convert site list to raster file (frequency of occurrence) 8 Run reports on the current site list stop Leave the s.menu program .in -5 .FI At the top of the menu is general information about the user's current MAPSET, LOCATION, etc. Note the above message in parentheses "current list: no sites." This message will vary depending on the status of the list. For example, after the user reads the existing site list file \fIarch_sites\fR, the message would read (given the geographic region indicated): "current list: 25 sites, 24 in current region." .bp 1 Read an existing site list .br .in +3 This option will copy an existing site list file into the current site list within the sites server. Existing site lists are stored under a GRASS data base and are pulled into the \fIs.menu\fR server via this option. Other sites menu functions operate only on the current site list file in the server -- you must therefore "read an existing site list" file BEFORE performing any of the other sites menu functions. .sp .25 Note: Site lists can be created and placed into a GRASS data base using \fIs.menu\fR option 5 (edit) followed by option 3 (save). However, the user can also create site lists using other methods or programs. One simple way to do this is to create a site list file in the appropriate format using any text editor (e.g., "vi"), and to put this site list file under the \fIsite_lists\fR directory under the user's current GRASS mapset (i.e., under $LOCATION/site_lists). The user can do this either inside of GRASS or outside of GRASS. Alternately, the user can run other GRASS programs which format their output as a GRASS site list file (\fIr.random, s.db.rim, v.mkquads, v.to.sites\fR), or the user can use UNIX programs like \fIawk\fR and \fIsed\fR to format other GRASS programs' output in the form of a site list file (\fId.what.rast, d.what.vect\fR). .in -3 2 Mask current site list .br .in +3 The site list can be reduced to a subset that includes only sites which fall in specific categories within a specified raster map layer. The user will be asked to specify the name of a raster map layer to form the basis for the mask, and will then be allowed to specify categories from this raster map that will limit the site list. As with .I r.mask, the category values selected designate the areas of the map in which information will remain. Areas assigned category values \fInot\fR selected will be re-assigned to category value "0" ("no data"). .sp .25 Note: This masking operation is performed only against the site list itself and not against other raster map layers. If the user wishes to analyze masked raster map layers, a mask should be create using the .I r.mask program. .in -3 3 Save the current site list in your mapset .br .in +3 The current site list can be stored permanently in your current mapset with this option. You will be asked to name the saved site list and to provide a short description of it. Saved site lists can be retrieved (option 1) during later runs of .I s.menu. Once saved, these site list files can be used with other GRASS programs, like \fId.sites, d.points, d.icons, p.icons, s.surf.idw\fR, and \fIs.db.rim\fR. .sp .25 Note: Saved lists will be removed if the GRASS mapset under which they are stored is removed. .in -3 4 Check site list for duplicate sites .br .in +3 It is not desirable that a site list contain multiple references to the same site. This option attempts to recognize duplicate sites. Duplicates are displayed to the user and can be removed automatically if the user desires. Duplicates can also be removed by hand using option 5 (edit). .in -3 5 Edit site list using a UNIX editor .br .in +3 The user can modify the current site list or create a new site list by hand using a UNIX editor. You will be asked to specify the text editor you prefer to use. You should exercise some care if you select this option. Lines in the site list which have invalid formats will be (silently) ignored by \fIs.menu\fR. See the GRASS manual entry \fIsites.format\fR for a description of the site list format. .sp .25 Note: This option will only modify the site list copied into the server. It does not modify the original site list stored under a GRASS mapset. If you wish to modify a stored site list file, you will have to combine options 1 (read), 5 (edit) and 3 (save). .in -3 6 Convert site list file to raster file (0/1) .br .in +3 You can create a raster data representation of the site list in your GRASS mapset. .sp .25 Once created, this raster map layer can be used with other raster map layers in further analyses. Allowing the user to create a raster map layer of sites opens up the full analysis capabilities for site data that are available for raster map layers within GRASS. .sp .25 You have the option of specifying the number of cells to represent a site. The minimum is one cell per site. The alternatives are squares around the site: 3x3, 5x5, 7x7, etc. .sp .25 The number of categories present in the new raster map layers will depend on the format of your site list file (see \fIsites.format\fR). You can create a non-binary raster map layer representation of your site list by creating the site list in the format: .in +2 .B "E|N|" .I "#n label" .in -2 where \fBE\fR is the Easting, \fBN\fR is the Northing, and \fI#n label\fR is the description field. The description field consists of a pound sign # followed by the category value \fIn\fR to be associated with the site's cell location, and the category label \fIlabel\fR for \fIn\fR. .sp .25 If the user does not include a description field starting with .in +2 .I #n .in -2 beside the Easting and Northing on \fIevery line\fR in the sites list file, a binary raster map layer will be created instead. In the binary raster file, each site will be represented as the category value 1. Non-site cells will be coded as category value 0. Note that only sites within the current geographic region will be considered. However, if the size of the sites is more than one cell ( 3x3, 5x5, etc.) and a site lies near an edge of the geographic region, some of the cells for the site may fall outside the geographic region. These cells will not appear in the raster map layer, and the site will no longer be 3x3 or 5x5 but will be clipped to fit the geographic region. .in -3 7 Convert site list file to raster file (frequency of occurrence) .br .in +3 You can also create a frequency of occurrence raster map layer representation of the site list file. .sp .25 The raster category values will be coded as the number of sites that fall within the cell. .sp .25 In this function, you do NOT have the option of specifying the number of cells to represent a site. .in -3 8 Run reports on the current site list .br .in +3 The current list of sites is passed to the report server after removing sites which do not fall within the geographic region of the user's current GRASS mapset (see \fIg.region\fR). The user then selects the names of one or more raster map layers for analysis. Data at (or near) the sites extracted from these raster map layers form the basis for all reports. .sp .25 The user specifies the 'size' of a site in cells. The 'size' may be specified as a single cell, or as a 3x3 square around the site, or 5x5, or 7x7, etc (where the size is an odd integer). .in -3 The following menu of reports is then presented: .NF .in +5 SITES REPORT MENU Please select one of the following 1 Site characteristics report 2 Site occurrence report 3 Convert data to S input format 4 Produce machine-readable data file stop return to SITES MAIN MENU .in -5 .FI 1 Site characteristics report .br .in +3 This report provides geographic information about each site. .sp .25 Each site is identified by description and locational information. The 'description' is an identification of the site. The site location is an easting and a northing. (The location does not denote the extent of the site, since, for example, an archeologic site which takes up two hectares would be represented as a single point). .sp .25 The information reported for each site is displayed by raster map layer, and, within each map layer, gives the categories (i.e., characteristics) that occurred at the site (as well as a count of the number of cells in each category). .sp .25 This can easily generate a massive amount of information, which is difficult to handle or digest quickly. Therefore, option 2 produces a synopsis of the information. .in -3 2 Site occurrence report .br .in +3 This report provides aggregate site characteristic information organized by raster map layer. The report produces chi-square statistics for each raster map layer, measuring number of expected sites (assuming a random distribution of sites) against actual site occurrence. The site characteristic is the most frequently occurring cell category in the site (i.e., the statistical mode). See the GRASS manual entry for \fIsites.occur\fR for details on this report. .in -3 3 Convert data to S input format .br .in +3 This function converts the GRASS data extracted for the sites into a form usable by the S statistical package. The user provides a file to contain the information. Once the file is written, the user must exit .I s.menu, run S on an S data base, and issue the S command .NF .B source \fIfile\fR .FI to bring the data into the S data base. (Of course, \fIfile\fR would be the name of the actual file supplied by the user.) See manual entry \fIsites.S\fR for an explanation of the S data structures created by this interface. .in -3 4 Produce machine-readable data file .br .in +3 This option provides a mechanism for the user to write his/her own reports. The data is written into a user-specified file as a text file, which has a format readable by UNIX utilities (e.g., \fIawk\fR) or user-written programs. See GRASS manual entry \fIsites.report\fR for details on this format. .in -3 .SH FILES $LOCATION/site_list/ .SH SEE ALSO .I d.icons, .I d.graph, .I d.points, .I d.sites, .I p.icons, .I r.random, .I d.what.rast, .I d.what.vect, .I r.what, .I s.in.ascii, .I s.out.ascii, .I s.db.rim, .I s.surf.idw, .I s.surf.tps, .I v.db.rim, .I v.mkquads, .I v.to.sites, .br and .br .I sites.format, .I sites.report, .I sites.occur, .I sites.S .SH "AUTHORS" Michael Shapiro, U.S. Army Construction Engineering Research Laboratory .br James Farley, Arkansas Archeological Survey, University of Arkansas .in +3 contributed the frequency of occurrence sites to cell function