pathrow_num-methods: Get WRS-2 path/row numbers for a given spatial object

Description Usage Arguments Value Examples

Description

Get WRS-2 path/row numbers for a given spatial object

Usage

1
2
3
4
5
6
7
pathrow_num(x, wrs_type = "2", wrs_mode = "D", as_polys = FALSE)

## S4 method for signature 'Raster'
pathrow_num(x, wrs_type, wrs_mode, as_polys)

## S4 method for signature 'Spatial'
pathrow_num(x, wrs_type, wrs_mode, as_polys)

Arguments

x

a spatial object

wrs_type

1 (for WRS-1) or 2 (for WRS-2)

wrs_mode

either 'D' for descending (daytime) or 'A' for ascending

as_polys

if FALSE (default) return a data.frame. If TRUE, return a SpatialPolygonsDataFrame.

Value

data.frame with path and row as integers, or, if as_polys=TRUE, a SpatialPolygonsDataFrame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(sp)

pathrow_num(test_poly)

x <- pathrow_num(test_poly, as_polys=TRUE)
plot(x)
plot(test_poly, add=TRUE, lty=2, col="#00ff0050")
text(coordinates(x), labels=paste(x$PATH, x$ROW, sep=', '))

## End(Not run)

wrspathrow documentation built on May 29, 2017, 3:24 p.m.