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
municbelongs. 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 toTRUEit would force a fresh download of the source file.- cache_dir
A path to a cache directory. On
NULLvalue (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")
#> Warning: cannot open URL 'https://www.catastro.hacienda.gob.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml': HTTP status was '500 Internal Server Error'
#> Warning: cannot open URL 'https://www.catastro.hacienda.gob.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml': HTTP status was '500 Internal Server Error'
#> Download failed
#>
#> url
#> https://www.catastro.hacienda.gob.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml not reachable.
#>
#> Please try with another options. If you think this is a bug please consider opening an issue
#> Error in catr_hlp_dwnload(api_entry, filename, cache_dir, verbose, update_cache, cache):
#> Execution halted
# }
