This is a package that provieds usefool tools to request and treat data from the different databases of the French cadaster. It also handles some manipulation of sp objects in order to be able extract the correct polygon from a (longitude, lattitude) localisation.
api used : BANO packages used : - sf - banR - dplyr - magrittr - assertthat - glue - R.utils
authors : - Régis Bouyoux - Jean-Eudues Peloye - Antoine Redier
Retrieves all addresses (+ useful info) that match the address query in the BANO database
adress_data <- cadastertools::get_bano_matches("12, rue de lota") adress_data <- adress_data[1,]
Downloads the json file containing the geo info according to the provided city_code and layer
town_json <- cadastertools::download_cadaster(adress_data$citycode, layer = "batiments")
Parses the provided GeoJSON to a Simple Features dataframe
town_data <- cadastertools::json_to_sf(town_json)
gets the nearest polygon from a long lat point in a given SF dataframe
house_poly <- cadastertools::get_nearest_polygon(town_data, adress_data$longitude, adress_data$latitude)
Gets the shape of the sf_dataframe that intersects the given polygon used to get the polygons corresponding to the same adress of other layers of the cadaster
town_data_parcelle <- cadastertools::json_to_sf(cadastertools::download_cadaster(adress_data$citycode, layer = "parcelles")) house_parcelle_poly <- cadastertools::get_parent_polygon(house_poly, town_data_parcelle)
Computes the area of a list of Single Feature geometries
area <- cadastertools::get_area(house_poly)
Creates polygon from coordinate list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.