mr_rev_geo_code: Reverse Geocode with Marineregions

View source: R/rev_geo_code.R

mr_rev_geo_codeR Documentation

Reverse Geocode with Marineregions

Description

Retrieve the names of geographic objects from coordinates (and optionally a radius around them).

Usage

mr_rev_geo_code(lat, lon, lat_radius = 1, lon_radius = 1, ...)

Arguments

lat

(numeric) Latitude for the coordinates (decimal format)

lon

(numeric) Longitude for the coordinates (decimal format)

lat_radius

(numeric) Extends search to include the range from lat-lat_radius to lat+lat_radius

lon_radius

(numeric) Extends search to include the range from lon-lon_radius to lon+lon_radius

...

curl options to be passed on to httr::GET()

Value

If no results, an empty list. If results found, a data.frame with the columns:

  • MRGID (integer)

  • gazetteerSource (character)

  • placeType (character)

  • latitude (numeric)

  • longitude (numeric)

  • minLatitude (numeric)

  • minLongitude (numeric)

  • maxLatitude (numeric)

  • maxLongitude (numeric)

  • precision (numeric)

  • preferredGazetteerName (character)

  • preferredGazetteerNameLang (character)

  • status (character)

  • accepted (integer)

Author(s)

Francois Michonneau francois.michonneau@gmail.com

Examples

## Not run: 
# Setting radius to 0.5
mr_rev_geo_code(-21.5, 55.5, lat_radius=0.5, lon_radius=0.5)

# radius to 3
mr_rev_geo_code(-21.5, 55.5, lat_radius=3, lon_radius=3)

# radius to 1
mr_rev_geo_code(-15, 45, lat_radius=1, lon_radius=1)

## End(Not run)

ropenscilabs/mregions documentation built on Feb. 28, 2024, 9:21 p.m.