Learn R Programming

rcanvec (version 0.2.1)

ntsstring: Generate NTS Reference Strings

Description

Generate NTS strings from NTS references or other arguments to generate such a list from nts() based on arguments provided.

Usage

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

Arguments

ntsid
An arbitrary number of NTS references in the form c("021", "H", "01") or list(c("021", "H", "01"), c("021", "A", "16")) to be converted
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

a character vector of NTS reference strings in the form "021H01".

Examples

Run this code
ntsstring(c("021", "H", "01"))

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

Run the code above in your browser using DataLab