osmsource_api {osmar}R Documentation

API OSM data source

Description

OSM API version 0.6 data source; see http://wiki.openstreetmap.org/wiki/API_v0.6.

Usage

  osmsource_api(url = "http://api.openstreetmap.org/api/0.6/")

Arguments

url

URL of the API

Supported request elements

Bounding box:

Use corner_bbox or center_bbox to retrieve:

Basic request elements:

Use node, way, relation to retrieve an element by its ID.

Use full = TRUE as additional argument to the get_osm function. This means that all members of the specified elements are retrieved as well:

References

http://wiki.openstreetmap.org/wiki/API_v0.6

See Also

get_osm, bbox, osm_descriptors

Other osmsource: osmsource_file, osmsource_osmosis

Examples

## Not run: 
    api <- osmsource_api()

    box <- corner_bbox(11.579341, 48.15102, 11.582852, 48.1530)
    gschw <- get_osm(box, source = api)

    kaufstr <- get_osm(way(3810479))
    kaufstr_full <- get_osm(way(3810479), full = TRUE)
  
## End(Not run)

[Package osmar version 1.1-7 Index]