Learn R Programming

climate (version 1.0.1)

get_coord_from_string: Getting coordinates from a string provided by the Ogimet web portal

Description

Internal function for cleaning coordinates' metadata provided by Ogimet

Usage

get_coord_from_string(txt, pattern = "Longitude")

Arguments

txt

string with coordinates from Ogimet

pattern

which element (Longitude or Latitude) to extract

Format

The returned object is the geographic coordinates using WGS84 (EPSG:4326) in decimal format. Negative values mean western or southern Hemisphere

Examples

Run this code
# NOT RUN {
 txt = "12120:   Leba (Poland)\nLatitude: 54-45N    Longitude: 017-32E    Altitude: 2 m."
 climate:::get_coord_from_string(txt, pattern = "Latitude")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab