downloadPlaces {velociraptr}R Documentation

Download Shapefile of Places

Description

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

Usage

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


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


[Package velociraptr version 1.1.0 Index]