formatPLSS: formatPLSS

View source: R/PLSS2LL.R

formatPLSSR Documentation

formatPLSS

Description

Format PLSS information into a coded format that can be digested by PLSS web service.

Usage

formatPLSS(p, type = "SN")

Arguments

p

data.frame with chunks of PLSS coordinates

type

an option to format protracted blocks 'PB', unprotracted blocks 'UP', or standard section number 'SN' (default).

Details

This function is typically accessed as a helper function to prepare data for use within PLSS2LL function.

Value

A vector of PLSS codes.

Note

This function expects that the Polygon object has coordinates associated with a projected CRS– e.g. units of meters.

This function requires the following packages: stringi.

Author(s)

D.E. Beaudette, Jay Skovlin, A.G. Brown

See Also

PLSS2LL

Examples

# create some data
d <- data.frame(
  id = 1:3,
  qq = c('SW', 'SW', 'SE'),
  q = c('NE', 'NW', 'SE'),
  s = c(17, 32, 30),
  t = c('T36N', 'T35N', 'T35N'),
  r = c('R29W', 'R28W', 'R28W'),
  type = 'SN',
  m = 'MT20',
  stringsAsFactors = FALSE
)
# add column names

names(d) <- c('id', 'qq', 'q', 's', 't', 'r', 'type', 'm')
# generate formatted PLSS codes
formatPLSS(d, type='SN')


sharpshootR documentation built on Oct. 23, 2024, 1:06 a.m.