Description Arguments Value Warning Examples
Get longitude/latitude from valid cadastral ref. or kml files from catastro.
x |
A valid spanish cadastral reference. |
parse_files |
bool. Default to FALSE. Set TRUE if source are KML files. |
A string for longitude/latitude if found. NA if not found.
You may be banned if many requests in short time are made.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## source is cadastral reference number ##
## Not run:
## geocode_cadastral("0636105UF3403N", parse_files = FALSE)
##"36.5209422288168,-4.89298751473745"
## Use lapply to geocode cadastral references from dataframe columns.
cadastral_references$new <- lapply(cadastral_references$cadref1, geocode_cadastral)
## separate previously generated "new" data into columns usign tidyr
# library(tidyr)
# separate(cadastral_references, new, into = c('longitude','latitude'), sep = "," )
## source is folder. A loop is needed to process each kml file ##
# files <- list.files("folder", full.names = T)
# for (f in files) {
# coords <- geocode_cadastral(f, parse_files = TRUE)
# d <- as.data.frame(rbind(d , as.data.frame(coords, stringsAsFactors = F )))
# }
# separate lat/lon into columns if you prefer using tidyr
# d <- tidyr::separate(coords, into = c("longitude","latitude"), sep = "," )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.