RiverStation: Intersection of 'SpatialPoints' and 'SpatialLinesDataFrame'

Description Usage Arguments Details Value Author(s) Examples

View source: R/RiverStation.R

Description

The function intersects objects SpatialPoints and SpatialLinesDataFrame. Identyfies the closer stretch(es) to a station. The SpatialPoints must be length 1.

Usage

1
RiverStation(x, y, window = 100)

Arguments

x

An object of class SpatialPoints as is defined in package sp and length 1.

y

An object of class SpatialLinesDataFrame as is defined in package sp.

window

A numeric value that represents the size of the square (window) around the x object.

Details

window value magnifies the object x in order to certainly secure the intersection with the object y. The greater value the more intersection area is defined.

Value

An object SpatialLinesDataFrame that is a subsect of th object x that represents the current intersection withe object x.

Author(s)

J.A. Torres

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(Watersheds)
data(WatershedsData)

station1 = WatershedsData$station
river1 = WatershedsData$river

tributary = RiverStation(station1, river1)
plot(tributary, col="blue")
plot(station1,pch=21,bg="red",cex=.8,add=TRUE)
plot.PolyLineAttribute(x=tributary, y="OBJECTID", dist=100, cex=.8)
title(main="Point station and tributary rivers")

Watersheds documentation built on May 2, 2019, 12:10 p.m.