formatPosition: Format Geographical Position in Degrees and Minutes

View source: R/map.R

formatPositionR Documentation

Format Geographical Position in Degrees and Minutes

Description

Format geographical positions to degrees, minutes, and hemispheres

Usage

formatPosition(
  latlon,
  isLat = TRUE,
  type = c("list", "string", "expression"),
  showHemi = TRUE
)

Arguments

latlon

a vector of latitudes or longitudes

isLat

a boolean that indicates whether the quantity is latitude or longitude

type

a string indicating the type of return value (see below)

showHemi

a boolean that indicates whether to indicate the hemisphere

Value

A list containing degrees, minutes, seconds, and hemispheres, or a vector of strings or (broken) a vector of expressions.

Author(s)

Dan Kelley

See Also

Other functions related to maps: lonlat2map(), lonlat2utm(), map2lonlat(), mapArrows(), mapAxis(), mapContour(), mapCoordinateSystem(), mapDirectionField(), mapGrid(), mapImage(), mapLines(), mapLocator(), mapLongitudeLatitudeXY(), mapPlot(), mapPoints(), mapPolygon(), mapScalebar(), mapText(), mapTissot(), oceCRS(), oceProject(), shiftLongitude(), usrLonLat(), utm2lonlat()

Examples

library(oce)
formatPosition(10 + 1:10 / 60 + 2.8 / 3600)
formatPosition(10 + 1:10 / 60 + 2.8 / 3600, type = "string")


oce documentation built on Sept. 11, 2024, 7:09 p.m.