UTM_Convertor: Convert UTM to other coordinate reference system.

View source: R/UTM_Convertor.R

UTM_ConvertorR Documentation

Convert UTM to other coordinate reference system.

Description

Converts UTM coordinates to the other coordinate reference system.

Usage

UTM_Convertor(
  point_ID,
  zone,
  northing,
  easting,
  CRS_To =
    "+proj=aea +lat_0=45 +lon_0=-126 +lat_1=50 +lat_2=58.5 +x_0=1000000 +y_0=0 +datum=NAD83 +units=m +no_defs",
  class = "sf"
)

Arguments

point_ID

character, Data point ID.

zone

integer, UTM zone.

northing

integer, UTM northing.

easting

integer, UTM easting.

CRS_To

character, Defines the spatial coordination reference that you wish to transform. Default is BC Albers reference system.

class

character, Define the class of returned objective. Currently this function supports either table or sf class. Default is table.

Value

Reprojected objective.

Author(s)

Yong Luo

Examples

## Not run: 
## for Prince Rupert, Fort Nelson, Prince George, Victoria, Kelowna
citylocs <- UTM_Convertor(point_ID = c("Prince Rupert", "Prince George",
                                       "Victoria", "Kelowna"),
                          zone = c(9, 10, 10, 11),
                          northing = c(6019079.41, 5974323.27, 5361626.96, 5528467.98),
                          easting = c(415075.83, 516441.65, 475594.70, 321996.76),
                          class = "sf")
bcbdry <- bcmaps::bc_bound(class = "sp")
plot(bcbdry)
plot(citylocs, col = "red", size = 10, add = TRUE)

## End(Not run)


bcgov/FAIBBase documentation built on June 19, 2024, 11:57 p.m.