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

View source: R/get_coord_from_string.R

get_coord_from_stringR Documentation

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


 txt = "12120:   Leba (Poland)\nLatitude: 54-45N    Longitude: 017-32E    Altitude: 2 m."
 climate:::get_coord_from_string(txt, pattern = "Latitude")



climate documentation built on Aug. 9, 2022, 5:08 p.m.