spgrass6-package {spgrass6} | R Documentation |
Interpreted interface between GRASS 6.0 geographical information system and R, based on starting R from within the GRASS environment. The interface uses classes defined in the sp package to hold spatial data.
Index:
readRAST6 read GRASS 6 raster files writeRAST6 write GRASS 6 raster files readVECT6 read GRASS 6 vector object files writeVECT6 write GRASS 6 vector object files gmeta6 read GRASS metadata from the current LOCATION getLocationProj return a PROJ.4 string of projection information gmeta2grd create a GridTopology object from the GRASS region vInfo return vector geometry information vColumns return vector database columns information vDataCount return count of vector database rows vect2neigh return area neighbours with shared boundary lengthFurther information may be found in the document
doc/spgrass_0.3.pdf
in the directory returned by system.file("", package="spgrass6")
.
Roger Bivand
Maintainer: Roger Bivand <Roger.Bivand@nhh.no>
if (nchar(Sys.getenv("GISRC")) > 0) { soilsph <- readRAST6("soils.ph", ignore.stderr=TRUE) summary(soilsph) grd <- gmeta2grd(ignore.stderr=TRUE) grd set.seed(1) smple <- overlay(soilsph, spsample(soilsph, 200, "random")) summary(smple) writeVECT6(smple, "sp_dem", v.in.ogr_flags="--overwrite", ignore.stderr=TRUE) bugsDF <- readVECT6("bugsites", ignore.stderr=TRUE) summary(bugsDF) vInfo("streams", ignore.stderr=TRUE) vColumns("streams", ignore.stderr=TRUE) vDataCount("streams", ignore.stderr=TRUE) streams <- readVECT6("streams", type="line,boundary", remove.duplicates=FALSE, ignore.stderr=TRUE) summary(streams) }