Learn R Programming

rcanvec (version 0.2.1)

nts: Generate NTS References

Description

Generate one or more NTS references based on arguments provided.

Usage

nts(..., lat = NULL, lon = NULL, bbox = NULL, atscale = nts.SCALE50K)

Arguments

...
An arbitrary number of strings in the form 21h1 to be parsed
lat
A vector of latitude values
lon
A vector of longitude values
bbox
A bounding box in the form returned by sp::bbox()
atscale
An integer value describing scale, either 1 (250k) or 2 (50k)

Value

one or more NTS references in the form c("021", "H", "01")

Examples

Run this code
nts('21h')
nts('21h1')
nts('21h1', '21a16', '021A15')
nts(lat=45.2, lon=-64.32)
nts(lat=c(45.2, 46.2), lon=c(-64.32, -64.81))

library(prettymapr)
nts(bbox=makebbox(45.125, -64.25, 44.875, -64.75))

Run the code above in your browser using DataLab