View source: R/geo_lite_struct.R
| geo_lite_struct | R Documentation |
Geocodes addresses already split into components and returns the
tibble associated with the query. See
geo_lite_struct_sf() for retrieving the data as an sf
object.
Corresponds to the structured query search described in the
API endpoint. To
perform a free-form search, use geo_lite().
geo_lite_struct(
amenity = NULL,
street = NULL,
city = NULL,
county = NULL,
state = NULL,
country = NULL,
postalcode = NULL,
lat = "lat",
long = "lon",
limit = 1,
full_results = FALSE,
return_addresses = TRUE,
verbose = FALSE,
nominatim_server = "https://nominatim.openstreetmap.org/",
custom_query = list()
)
amenity |
Name and/or type of POI. See also |
street |
House number and street name. |
city |
City. |
county |
County. |
state |
State. |
country |
Country. |
postalcode |
Postal code. |
lat |
Latitude column name in the output data (default |
long |
Longitude column name in the output data (default |
limit |
Maximum number of results to return per input address. Note that each query returns a maximum of 50 results. |
full_results |
Return all available data from the Nominatim API.
If |
return_addresses |
Return input addresses with results if |
verbose |
If |
nominatim_server |
URL of the Nominatim server to use. Defaults to
|
custom_query |
Named list with API-specific parameters, for example
|
The structured form of the search query allows you to look up an address that is already split into its components. Each parameter represents a field of the address. All parameters are optional. You should only use the ones that are relevant for the address you want to geocode.
See https://nominatim.org/release-docs/latest/api/Search/ for additional
parameters to be passed to custom_query.
A tibble with the results that match the query.
tidygeocoder::geo().
Geocoding:
geo_address_lookup(),
geo_address_lookup_sf(),
geo_amenity(),
geo_amenity_sf(),
geo_lite(),
geo_lite_sf(),
geo_lite_struct_sf()
pl_mayor <- geo_lite_struct(
street = "Plaza Mayor", country = "Spain",
limit = 50, full_results = TRUE
)
dplyr::glimpse(pl_mayor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.