CatastRo
R package to query Sede electrónica del Catastro API. The API is documented here.
Installation
library(devtools)
install_github("rOpenSpain/CatastRo")
Query a coordinate
The function get_rc()
receives the coordinates (lat,lon) and the spatial reference used. The return is the casdastral reference of the property in that spatial point, as well as the direction (town street and number).
reference <- get_rc(lat, lon, SRS)
print(reference)
It can be requested to get all the cadastral references in a square of 50-meters side centered in the coordinates (lat,lon) throught the function near_rc()
.
references <- near_rc(lat, lon, SRS)
print(references)
Query CPMRC
It is possible, as well, the opposite. Given to the function get_coor()
a cadastral reference, get_coor()
returns its coordinates (lat,lon) in a particular SRS moreover the direction (town, street and number).
direction <- get_coor(Cadastral_Reference, SRS, Province, Municipality)
# The argument SRS could be missed, in that case, `get_coor()` returns the coordinates in the SRS used by Google Maps.
print(direction)