downloadPlaces: Download Shapefile of Places

Description Usage Arguments Details Value Author(s) Examples

View source: R/downloadPlaces.R

Description

Download a shapefile of a geolocation from the Macrostrat API's implementation of the Who's on First database by MapZen.

Usage

1
downloadPlaces(Place = "Wisconsin", Type = "region")

Arguments

Place

A character string; the name of a place

Type

A character string; a type of place

Details

Download a shapefile of a geolocation from the Macrostrat API. The Macrostrat database provides a GeoJSON of a particular location given the location's name and type. Type can be of the categories: "continent", "country", "region", "county", and "locality".

If multiple locations of the same type share the same name (e.g., Alexandria), the route will return a feature collection of all matching polygons.

Value

An rgdal compatible shapefile

Author(s)

Andrew A. Zaffos

Examples

1
2
3
4
5
6
7
8
# Download a polygon of Dane County, Wisconsin, United States, North America
# DaneCounty<-downloadPlaces(Place="Dane",Type="county")

# Download a polygon of Wisconsin, United States, North America
# Wisconsin<-downloadPlaces(Place="Wisconsin",Type="region")

# Download a polygon of North America
# NorthAmerica<-downloadPlaces(Place="North America",Type="continent")

velociraptr documentation built on Aug. 1, 2019, 1:05 a.m.