Commit 4f6061e8 authored by jml's avatar jml
Browse files

put on gitlab

parents
^.*\.Rproj$
^\.Rproj\.user$
.Rproj.user
.Rhistory
.RData
Package: easycityosm
Type: Package
Version: 0.0.1
Authors@R: c(person("Jean-Marie", "Lepioufle", , "jml@nilu.no", role=c("aut","cre")))
Title: easycityosm
Description: Quickly get osm data related to a city with key features.
- get main features from osm.
- easy plot.
Depends:
R (>= 3.4.2)
Imports:
osmdata,
sf,
lwgeom,
units,
dplyr,
grDevices,
graphics
Suggests:
knitr, data.luftkval.oslo10
Remotes:
git::git@git.nilu.no:rextdata/data.luftkval.oslo10.git,
VignetteBuilder: knitr
License: GPL-3
Encoding: UTF-8
LazyData: false
RoxygenNote: 6.1.0
# Generated by roxygen2: do not edit by hand
export(boundary_administrative_sf)
export(boundary_national_park_sf)
export(building_apartments_sf)
export(building_commercial_sf)
export(building_house_sf)
export(building_industrial_sf)
export(building_office_sf)
export(building_residential_sf)
export(get_osmdata_sf)
export(highway_motorway_sf)
export(highway_primary_sf)
export(highway_secondary_sf)
export(highway_trunk_sf)
export(landuse_brownfield_sf)
export(landuse_cemetery_sf)
export(landuse_commercial_sf)
export(landuse_depot_sf)
export(landuse_farmland_sf)
export(landuse_farmyard_sf)
export(landuse_forest_sf)
export(landuse_grass_sf)
export(landuse_industrial_sf)
export(landuse_meadow_sf)
export(landuse_railway_sf)
export(landuse_residential_sf)
export(landuse_retail_sf)
export(natural_coastline_sf)
export(natural_wood_sf)
export(place_island_sf)
export(place_islet_sf)
export(plot_city)
export(plot_city_coastline)
export(plot_city_commercial)
export(plot_city_depot)
export(plot_city_forest)
export(plot_city_grass)
export(plot_city_industrial)
export(plot_city_island)
export(plot_city_meadow)
export(plot_city_residential)
export(plot_city_roads)
export(plot_city_water)
export(waterway_river_sf)
export(waterway_water_sf)
importFrom(dplyr,"%>%")
importFrom(graphics,plot)
#' boundary_administrative_sf
#' boundary_administrative_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' boundary_administrative_sf()
#' }
boundary_administrative_sf <- function(city){
res <- get_osmdata_sf(city=city,key='boundary',value="administrative")
return(res)
}
#' natural_coastline_sf
#' natural_coastline_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' natural_coastline_sf()
#' }
natural_coastline_sf <- function(city){
res <- get_osmdata_sf(city=city,key='natural',value="coastline")
return(res)
}
#' landuse_commercial_sf
#' landuse_commercial_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_commercial_sf()
#' }
landuse_commercial_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="commercial")
return(res)
}
#' building_commercial_sf
#' building_commercial_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' building_commercial_sf()
#' }
building_commercial_sf <- function(city){
res <- get_osmdata_sf(city=city,key='building',value="commercial")
return(res)
}
#' building_office_sf
#' building_office_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' building_office_sf()
#' }
building_office_sf <- function(city){
res <- get_osmdata_sf(city=city,key='building',value="office")
return(res)
}
#' landuse_retail_sf
#' landuse_retail_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_retail_sf()
#' }
landuse_retail_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="retail")
return(res)
}
#' landuse_railway_sf
#' landuse_railway_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_railway_sf()
#' }
landuse_railway_sf<- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="railway")
return(res)
}
#' landuse_depot_sf
#' landuse_depot_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_depot_sf()
#' }
landuse_depot_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="depot")
return(res)
}
#' landuse_brownfield_sf
#' landuse_brownfield_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_brownfield_sf()
#' }
landuse_brownfield_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="brownfield")
return(res)
}
#' natural_wood_sf
#' natural_wood_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' natural_wood_sf()
#' }
natural_wood_sf <- function(city){
res <- get_osmdata_sf(city=city,key='natural',value="wood")
return(res)
}
#' boundary_national_park_sf
#' boundary_national_park_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' boundary_national_park_sf()
#' }
boundary_national_park_sf <- function(city){
res <- get_osmdata_sf(city=city,key='boundary',value="national_park")
return(res)
}
#' landuse_forest_sf
#' landuse_forest_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_forest_sf()
#' }
landuse_forest_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="forest")
return(res)
}
#' landuse_grass_sf
#' landuse_grass_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_grass_sf()
#' }
landuse_grass_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="grass")
return(res)
}
#' landuse_cemetery_sf
#' landuse_cemetery_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_cemetery_sf()
#' }
landuse_cemetery_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="cemetery")
return(res)
}
#' landuse_industrial_sf
#' landuse_industrial_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_industrial_sf()
#' }
landuse_industrial_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="industrial")
return(res)
}
#' building_industrial_sf
#' building_industrial_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' building_industrial_sf()
#' }
building_industrial_sf <- function(city){
res <- get_osmdata_sf(city=city,key='building',value="industrial")
return(res)
}
#' place_island_sf
#' place_island_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' place_island_sf()
#' }
place_island_sf <- function(city){
res <- get_osmdata_sf(city=city,key='place',value="island")
return(res)
}
#' place_islet_sf
#' place_islet_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' place_islet_sf()
#' }
place_islet_sf <- function(city){
res <- get_osmdata_sf(city=city,key='place',value="islet")
return(res)
}
#' landuse_meadow_sf
#' landuse_meadow_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_meadow_sf()
#' }
landuse_meadow_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="meadow")
return(res)
}
#' landuse_farmyard_sf
#' landuse_farmyard_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_farmyard_sf()
#' }
landuse_farmyard_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="farmyard")
return(res)
}
#' landuse_farmland_sf
#' landuse_farmland_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_farmland_sf()
#' }
landuse_farmland_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="farmland")
return(res)
}
#' get_osmdata_sf
#' get_osmdata_sf
#' @param city name of the city
#' @param key name of the key
#' @param value name of the value
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' get_osmdata_sf()
#' }
get_osmdata_sf <- function(city,key,value){
res <- osmdata::opq(bbox = city) %>%
osmdata::add_osm_feature(key = key,value=value) %>%
osmdata::osmdata_sf()
return(res)
}
This diff is collapsed.
#' landuse_residential_sf
#' landuse_residential_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' landuse_residential_sf()
#' }
landuse_residential_sf <- function(city){
res <- get_osmdata_sf(city=city,key='landuse',value="residential")
return(res)
}
#' building_residential_sf
#' building_residential_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' building_residential_sf()
#' }
building_residential_sf <- function(city){
res <- get_osmdata_sf(city=city,key='building',value="residential")
return(res)
}
#' building_apartments_sf
#' building_apartments_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' building_apartments_sf()
#' }
building_apartments_sf <- function(city){
res <- get_osmdata_sf(city=city,key='building',value="apartments")
return(res)
}
#' building_house_sf
#' building_house_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' building_house_sf()
#' }
building_house_sf <- function(city){
res <- get_osmdata_sf(city=city,key='building',value="house")
return(res)
}
#' highway_primary_sf
#' highway_primary_sf
#' @param city name of the city
#' @keywords easycitymap
#' @export
#' @examples
#' \dontrun{
#' highway_primary_sf()
#' }
highway_primary_sf <- function(city){
res <- get_osmdata_sf(city=city,key='highway',value="primary")
return(res)
}
#' highway_secondary_sf
#' highway_secondary_sf
#' @param city name of the city
#' @keywords easycitymap
#' @export
#' @examples
#' \dontrun{
#' highway_secondary_sf()
#' }
highway_secondary_sf <- function(city){
res <- get_osmdata_sf(city=city,key='highway',value="secondary")
return(res)
}
#' highway_motorway_sf
#' highway_motorway_sf
#' @param city name of the city
#' @keywords easycitymap
#' @export
#' @examples
#' \dontrun{
#' highway_motorway_sf()
#' }
highway_motorway_sf <- function(city){
res <- get_osmdata_sf(city=city,key='highway',value="motorway")
return(res)
}
#' highway_trunk_sf
#' highway_trunk_sf
#' @param city name of the city
#' @keywords easycitymap
#' @export
#' @examples
#' \dontrun{
#' highway_trunk_sf()
#' }
highway_trunk_sf <- function(city){
res <- get_osmdata_sf(city=city,key='highway',value="trunk")
return(res)
}
#' @importFrom dplyr %>%
NULL
#' @importFrom graphics plot
NULL
#' waterway_river_sf
#' waterway_river_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' waterway_river_sf()
#' }
waterway_river_sf <- function(city){
res <- get_osmdata_sf(city=city,key='waterway',value="river")
return(res)
}
#' waterway_water_sf
#' waterway_water_sf
#' @param city name of the city
#' @keywords easycityosm
#' @export
#' @examples
#' \dontrun{
#' waterway_water_sf()
#' }
waterway_water_sf <- function(city){
res <- get_osmdata_sf(city=city,key='waterway',value="water")
return(res)
}
.onLoad <- function(libname, pkgname) {
base::require("sf")
invisible()
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment