Search for a municipality (as a string, part of string or code) and get the corresponding coding as per the Cadastre.
Usage
catr_atom_search_munic(
munic,
to = NULL,
cache = TRUE,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE
)
Arguments
- munic
Municipality to extract, It can be a part of a string or the cadastral code.
- to
Optional parameter for defining the Territorial Office to which
munic
belongs. This parameter is a helper for narrowing the search.- cache
A logical whether to do caching. Default is
TRUE
. See About caching section oncatr_set_cache_dir()
.- update_cache
A logical whether to update cache. Default is
FALSE
. When set toTRUE
it would force a fresh download of the source file.- cache_dir
A path to a cache directory. On
NULL
value (the default) the function would store the cached files on thetempdir
.- verbose
Logical, displays information. Useful for debugging, default is
FALSE
.
Value
A tibble
.
See also
Other INSPIRE ATOM services:
catr_atom_get_address()
,
catr_atom_get_address_db_all()
,
catr_atom_get_buildings()
,
catr_atom_get_buildings_db_all()
,
catr_atom_get_parcels()
,
catr_atom_get_parcels_db_all()
Other search:
catr_get_code_from_coords()
,
catr_ovc_get_cod_munic()
,
catr_ovc_get_cod_provinces()
Other databases:
catr_atom_get_address_db_all()
,
catr_atom_get_buildings_db_all()
,
catr_atom_get_parcels_db_all()
,
catr_srs_values
Examples
# \donttest{
catr_atom_search_munic("Mad")
#> # A tibble: 40 × 3
#> territorial_office munic catrcode
#> <chr> <chr> <chr>
#> 1 Territorial office 02 Albacete 02045-MADRIGUERAS 02045
#> 2 Territorial office 02 Albacete 02058-PATERNA DEL MADERA 02058
#> 3 Territorial office 05 Avila 05114-MADRIGAL DE LAS ALTAS TORRES 05114
#> 4 Territorial office 09 Burgos 09178-HUMADA 09178
#> 5 Territorial office 09 Burgos 09187-JARAMILLO QUEMADO 09187
#> 6 Territorial office 09 Burgos 09200-MADRIGAL DEL MONTE 09200
#> 7 Territorial office 09 Burgos 09201-MADRIGALEJO DEL MONTE 09201
#> 8 Territorial office 09 Burgos 09287-QUEMADA 09287
#> 9 Territorial office 10 Cáceres 10114-MADRIGAL DE LA VERA 10114
#> 10 Territorial office 10 Cáceres 10115-MADRIGALEJO 10115
#> # ℹ 30 more rows
# }