cadastertools

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

get_bano_matches

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,]

download_cadaster

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")

json_to_sf

Parses the provided GeoJSON to a Simple Features dataframe

town_data <- cadastertools::json_to_sf(town_json)

get_nearest_polygon

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)

get_parent_polygon

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)

get_area

Computes the area of a list of Single Feature geometries

area <- cadastertools::get_area(house_poly)

polygon_from_list

Creates polygon from coordinate list



peloyeje/map536-cadastertools documentation built on May 14, 2019, 4:03 a.m.