pathrow_num: 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
pathrow_num(x, wrs_type = "2", wrs_mode = "D", as_polys = FALSE)

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)

azvoleff/wrspathrow documentation built on June 4, 2017, 12:09 a.m.