sharpshootR (version 1.6)

PLSS2LL: PLSS2LL

Description

Fetch lattitude and longitude centroid coordinates for coded PLSS information from the BLM PLSS web service.

Usage

PLSS2LL(p)

Arguments

p

dataframe with chunks of PLSS coordinates

Value

A dataframe of PLSS codes and coordinates.

Details

This function takes coded PLSS information and fetches the centroid lat/long coordinates down to the quarter-quarter section. The 'plssid' column is generated within a dataframe using the following formatPLSS function.

See Also

LL2PLSS, formatPLSS

Examples

Run this code
# NOT RUN {
if(requireNamespace("curl") &
   curl::has_internet()
   ) {
  
  
# 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
d$plssid <- formatPLSS(d)

# fetch lat/long coordinates
PLSS2LL(d)
  
}

# }

Run the code above in your browser using DataLab