engr_survey_reverse: Conversion of Latitude/Longitude Coordinates to Engineering...

engr_survey_reverseR Documentation

Conversion of Latitude/Longitude Coordinates to Engineering Survey Measurements (KY and TN)

Description

Takes geodetic coordinates of the World Geodetic System (WGS) (19)84 (EPSG:4326) [MapTiler Reference] and converts those values into Kentucky or Tennessee-based Northing and Easting engineering survey measurements [based in the State Plane Coordinate System (SPCS)] in meters, international foot, or US survey foot. Each latitude Y and longitude X point is verified to be located within Kentucky or Tennessee.

Usage

engr_survey_reverse(
  latitude,
  longitude,
  units = c("survey_ft", "foot", "meters"),
  location = c("KY", "TN"),
  output = c("basic", "table"),
  utm = c(0, 1)
)

Arguments

latitude

numeric vector or character vector with spaces, degree symbol, single quotation mark, and/or escaped quotation mark (\") that contains the latitude coordinate point. The following possibilities are valid: -25.02, "25\U00B056'50.2068\"N"; "15\U00B056'58.7068"; "37'1'54.3'N"; "35 8 46.44496", "35'8'46.44496". If the North designation is not provided, then it will be added. The latitude/longitude coordinate pair has to be either a numeric or character vector (no mixing).

longitude

numeric vector or character vector with spaces, degree symbol, single quotation mark, and/or escaped quotation mark (\") that contains the latitude coordinate point. The following possibilities are valid: 09.83, "25\U00B056'50.2068\"W"; "15\U00B056'58.7068"; "37'1'54.3'E"; "35 8 46.44496", "35'8'46.44496". If the West designation is not provided, then it will be added. The latitude/longitude coordinate pair has to be either a numeric or character vector (no mixing).

units

character vector that contains the system of units (options are survey_ft (United States Customary System) [US survey foot], foot, or meters (International System of Units) [meters]

location

character vector that contains the location name ('KY' for Kentucky or 'TN' for Tennessee)

output

character vector that contains basic for the default result using a simple data.table or table for the result as a complex data.table

utm

numeric vector that contains 0 or 1 only. 0 represents do not provide the utm coordinates and 1 is to provide the utm coordinates

Value

the geodetic coordinates as projected SPCS Northing and Easting coordinates as a data.table

Note

Please Note: If you have Kentucky North/South Zone survey measurements, then please use the Kentucky Geological Survey, University of Kentucky - Kentucky Single Coordinate Conversion Tool (http://kgs.uky.edu/kgsweb/CoordConversionTool.asp) instead. That tool will give you the geographic coordinates too. This R function, engr_survey_reverse will only be valid for NAD83 / Kentucky Single Zone.

Useful Tennessee reference Web site Tennessee Department of Transportation Roadway Design Survey Standards (https://www.tn.gov/tdot/roadway-design/survey-standards.html)

Useful Kentucky reference Web site Kentucky Transportation Cabinet Survey Coordination (https://transportation.ky.gov/Highway-Design/Pages/Survey-Coordination.aspx)

Author(s)

Irucka Embry, Berry Boessenkool (a couple of functions are sourced from OSMscale)

Source

  1. Win-Vector Blog. John Mount, June 11, 2018, "R Tip: use isTRUE()", https://win-vector.com/2018/06/11/r-tip-use-istrue/.

  2. Latitude Longitude Coordinates to State Code in R - Stack Overflow answered by Josh O'Brien on Jan 6 2012 and edited by Josh O'Brien on Jun 18, 2020. See https://stackoverflow.com/questions/8751497/latitude-longitude-coordinates-to-state-code-in-r.

  3. r - Convert column classes in data.table - Stack Overflow answered by Matt Dowle on Dec 27 2013. See https://stackoverflow.com/questions/7813578/convert-column-classes-in-data-table.

  4. Excel vlook up function in R for data frame - Stack Overflow answered by Tyler Rinker on Apr 8 2013 and edited by Tyler Rinker on Feb 26 2014. See https://stackoverflow.com/questions/15882743/excel-vlook-up-function-in-r-for-data-frame.

  5. r - Converting geo coordinates from degree to decimal - Stack Overflow answered by Robbes on Jan 3 2018 and edited by ayaio on Jan 3 2018. See https://stackoverflow.com/questions/14404596/converting-geo-coordinates-from-degree-to-decimal.

References

  1. udunits.dat, v 1.18 2006/09/20 18:59:18 steve Exp, https://web.archive.org/web/20230202155021/https://www.unidata.ucar.edu/software/udunits/udunits-1/udunits.txt. Retrieved thanks to the Internet Archive: Wayback Machine

  2. Spatial Reference, Aug. 13, 2004, "EPSG:3088: NAD83 / Kentucky Single Zone", https://spatialreference.org/ref/epsg/3088/.

  3. Spatial Reference, March 7, 2000, "EPSG:32136 NAD83 / Tennessee", https://spatialreference.org/ref/epsg/32136/.

  4. MapTiler Team, "EPSG:4326: WGS 84 – WGS84 - World Geodetic System 1984, used in GPS, https://epsg.io/4326.

  5. Tennessee Department of Transportation Design Division, Tennessee Department of Transportation Tennessee Geodetic Reference Network (TGRN) Reference Manual Second Edition Issued, page ix, https://www.tn.gov/content/dam/tn/tdot/documents/TgrnComposite.pdf.

  6. Earth Point, "State Plane Coordinate System - Convert, View on Google Earth", https://www.earthpoint.us/StatePlane.aspx.

  7. National Geodetic Survey datasheet95, version 8.12.5.3, online retrieval date July 25, 2019, Mid Valley Oil Rad Relay Twr designation, HA1363 PID, Grayson County Kentucky, Clarkson (1967) USGS Quad, https://www.ngs.noaa.gov/cgi-bin/ds_mark.prl?PidBox=HA1363.

  8. National Geodetic Survey datasheet95, version 8.12.5.3, online retrieval date July 25, 2019, 2006 42 07 designation, DL4005 PID, Fayette County Kentucky, Lexington West (1993) USGS Quad, https://www.ngs.noaa.gov/cgi-bin/ds_mark.prl?PidBox=DL4005.

Examples


# Please refer to the iemisc: Engineering Survey Examples vignette for
# additional examples

# Test against TGRN Manual (Reference 5)
# using the 1983 (1995) DATUM
# GPS 60 is the station name with these coordinates
# latitude (North) = 35 8 46.44496
# longitude (West) = 89 54 24.04763

# Northing is 97296.815 # provided in TGRN Manual
# Easting is 244089.427 # provided in TGRN Manual

library(iemisc)

latitude <- "35 8 46.44496"
longitude <- "89 54 24.04763"

Northing_test2 <- 97296.815 # provided in TGRN Manual
Easting_test2 <- 244089.427 # provided in TGRN Manual

tgrn2A <- engr_survey_reverse(latitude, longitude, "meters", "TN", output = "table",
utm = 0)
tgrn2A

tgrn2B <- engr_survey(Northing_test2, Easting_test2, "meters", "TN", output = "table",
utm = 0)
tgrn2B




# Example 1

# Tennessee

library(iemisc)

lat <- 35.8466965

long <- -88.9206794

dt1B <- engr_survey_reverse(lat, long, units = "survey_ft", location = "TN", output =
"basic", utm = 1)
dt1B




# Example 2

# Kentucky

library(iemisc)

lats <- "37'50'21.5988''N"
longs <- "84'16'12.0720'W"

dt2A <- engr_survey_reverse(lats, longs, "foot", "KY", output = "basic", utm = 0)
dt2A






iemisc documentation built on Sept. 25, 2023, 5:09 p.m.