View source: R/catr-code-coords.R
| catr_get_code_from_coords | R Documentation |
Get the municipality code for coordinates using a sf
object or a pair of coordinates via catr_ovc_get_cod_munic().
catr_get_code_from_coords(
x,
srs = NULL,
verbose = FALSE,
cache_dir = NULL,
...
)
x |
It may be:
|
srs |
SRS/CRS to use on the query. To see allowed values, use
catr_srs_values, specifically the |
verbose |
Logical. If |
cache_dir |
Path to a cache directory. On |
... |
Arguments passed on to
|
On a successful query, the function returns a tibble with one row including the following columns:
munic: Name of the municipality as per the Cadastre.
catr_to: Cadastral territorial office code.
catr_munic: Municipality code as recorded on the Cadastre.
catrcode: Full Cadastral code for the municipality.
cpro: Province code as per the INE.
cmun: Municipality code as per the INE.
inecode: Full INE code for the municipality.
Rest of fields: Check the API Docs.
A tibble. See Details
mapSpain::esp_get_munic_siane(), catr_ovc_get_cod_munic(),
sf::st_centroid().
Other search:
catr_atom_search_munic(),
catr_ovc_get_cod_munic(),
catr_ovc_get_cod_provinces()
# Use with coords
catr_get_code_from_coords(c(-16.25462, 28.46824), srs = 4326)
# Use with sf
prov <- mapSpain::esp_get_prov("Caceres")
catr_get_code_from_coords(prov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.