get_cartociudad_location_info: Administrative information for a location

View source: R/get_cartociudad_location_info.R

get_cartociudad_location_infoR Documentation

Administrative information for a location

Description

Returns the administrative information related to a geographical point in Spain: province, municipality, censal district, censal section, cadastral reference and reverse geocoding data.

Usage

get_cartociudad_location_info(latitude, longitude, year = 2016,
  info.source = c("census", "cadastre", "reverse"))

Arguments

latitude

Point latitude in geographical coordinates (e.g., 40.473219)

longitude

Point longitude in geographical coordinates (e.g., -3.7227241)

year

Reference year; see Details section

info.source

A character vector specifying the APIs to consult. Possible values are "census", "cadastre" and "reverse"

Details

This function consults administrative information for a point within Spain. Censal information is consulted from a different set of layers, each one corresponding to a different year. Whereas provincial and municipal information is mostly stable, censal districts and sections may be subject to greater changes over the years.

Value

A list contaning the administrative information for the given point. For info.source = "census" it contains the province, municipality, censal discrict and censal section codes. For info.source = "cadastre" it contains the cadastral reference and the url to the spanish cadastre website. For info.source = "reverse" it contains the details of the address closest to the specified location, such us road type, number, zip code, street name, ... More information about reverse geocoding in cartociudad_reverse_geocode.

Author(s)

Luz Frías with small edits by Carlos J. Gil Bellosta

References

INE's web service is mostly undocumented and the function has been built by reverse engineering API calls. However, users may want to check the capabilities of INEs WMS service at http://goo.gl/aKn3vj. Cadastre web service documentation can be consulted at http://goo.gl/lKkwK and WMS service capabilities at http://goo.gl/5JAd9N.

Examples

## Not run: 
get_cartociudad_location_info(40.473219, -3.7227241)

## End(Not run)


rOpenSpain/caRtociudad documentation built on June 9, 2022, 7:38 p.m.