luck.ash {spsurvey}R Documentation

Example Polygons Dataset

Description

This dataset is a list composed of two element, each of which is a matrix containing the x-coordinates and y-coordinates for a polyline.

Usage

data(luck.ash)

Format

A list containing two elements:

1
a matrix containing two variables named xcoord and ycoord, which are the x-coordinates and y-coordinates for the first polyline.
2
a matrix containing two variables named xcoord and ycoord, which are the x-coordinates and y-coordinates for the second polyline.
3
a matrix containing two variables named xcoord and ycoord, which are the x-coordinates and y-coordinates for the third polyline.
4
a matrix containing two variables named xcoord and ycoord, which are the x-coordinates and y-coordinates for the fourth polyline.
5
a matrix containing two variables named xcoord and ycoord, which are the x-coordinates and y-coordinates for the fifth polyline.

Source

This dataset is a subset of all perennial and intermittent streams and rivers in the Luckiamute Watershed Council basin in Oregon. Watershed boundaries were defined by the Luckiamute Watershed Council. The GIS stream network coverage was obtained from the Pacific Northwest (PNW) portion of the U.S. EPA reach file system (RF3).

References

Horn, C.R. and Grayman, W.M. (1993). Water-quality modeling with EPA reach file system. Journal of Water Resources Planning and Management, 119, 262-274.

Examples

# This example converts the dataset to an sp package object
data(luck.ash)
n <- length(luck.ash)
nparts <- rep(1, n)
IDs <- as.character(1:n)
shapes <- vector(mode="list", length=n)
for(i in 1:n) {
   shapes[[i]] <- list(Pstart=0, verts=luck.ash[[i]], 
      nVerts=nrow(luck.ash[[i]]), nParts=nparts[i])
}
PolylinesList <- vector(mode="list", length=n)
for(i in 1:n) {
  PolylinesList[[i]] <- shape2spList(shape=shapes[[i]], shp.type="arc",
     ID=IDs[i])
}
att.data <- data.frame(id=1:n, length=rep(NA, n))
rownames(att.data) <- IDs
sp.obj <- SpatialLinesDataFrame(sl=SpatialLines(LinesList=PolylinesList),
   data=att.data)
# To convert the sp package object to a shapefile use the following code: 
# sp2shape(sp.obj, "luck.ash")

[Package spsurvey version 2.0 Index]