reverse_geo_lite: Reverse geocode coordinates

Description Usage Arguments Details Value See Also Examples

View source: R/reverse_geo_lite.R

Description

Reverse geocodes geographic coordinates (latitude and longitude) given as numeric values. Latitudes must be between -90 and 90 and longitudes must be between -180 and 180.

Usage

1
2
3
4
5
6
7
8
9
reverse_geo_lite(
  lat,
  long,
  address = "address",
  full_results = FALSE,
  return_coords = TRUE,
  verbose = FALSE,
  custom_query = list()
)

Arguments

lat

latitude values (input data)

long

longitude values (input data)

address

name of the address column (in the output data)

full_results

returns all available data from the geocoding service if TRUE. If FALSE (default) then only a single address column is returned from the geocoding service.

return_coords

return input coordinates with results if TRUE. Note that most services return the input coordinates with full_results = TRUE and setting return_coords to FALSE does not prevent this.

verbose

if TRUE then detailed logs are output to the console. FALSE is default. Can be set permanently with options(tidygeocoder.verbose = TRUE)

custom_query

API-specific parameters to be used, passed as a named list (ie. list(zoom = 3)). See Details.

Details

See https://nominatim.org/release-docs/develop/api/Reverse/ for additional parameters to be passed to custom_query.

Use the option custom_query = list(zoom = 3) to adjust the output. Some equivalences on terms of zoom:

zoom address_detail
3 country
5 state
8 county
10 city
14 suburb
16 major streets
17 major and minor streets
18 building

Value

A tibble with the results.

See Also

reverse_geo_lite_sf(), tidygeocoder::reverse_geo()

Other geocoding: geo_address_lookup(), geo_amenity(), geo_lite()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
reverse_geo_lite(lat = 40.75728, long = -73.98586)

# Several coordinates
reverse_geo_lite(
  lat = c(40.75728, 55.95335),
  long = c(-73.98586, -3.188375)
)

# With options: zoom to country
reverse_geo_lite(
  lat = c(40.75728, 55.95335),
  long = c(-73.98586, -3.188375),
  custom_query = list(zoom = 0),
  verbose = TRUE,
  full_results = TRUE
)

nominatimlite documentation built on Nov. 27, 2021, 1:07 a.m.