within_extent {arcgisplaces}R Documentation

Search for places within an extent (bounding box).

Description

The ⁠/places/within-extent⁠ request searches for places within an extent (bounding box).

Usage

within_extent(
  xmin,
  ymin,
  xmax,
  ymax,
  search_text = NULL,
  category_id = NULL,
  icon = NULL,
  token = arc_token()
)

Arguments

xmin

The minimum x coordinate, or longitude, of the search extent in EPSG:4326.

ymin

The minimum y coordinate, or latitude, of the search extent in EPSG:4326

xmax

The maximum x coordinate, or longitude, of the search extent in EPSG:4326.

ymax

The maximum y coordinate, or latitude, of the search extent in EPSG:4326

search_text

Default NULL. Free search text for places against names, categories etc. Must be a scalar value.

category_id

Default NULL. A character vector which filters places to those that match the category IDs.

icon

Default NULL. Must be one of "svg", "png" "cim". Determines whether icons are returned and the type of icon to use with a place or category.

token

an object of class httr2_token as generated by auth_code() or related function

Details

You must supply the xmin, ymin, xmax and ymax coordinates to define the extent. The maximum width and height of an extent that can be used in a search is 20,000 meters.

You can also provide multiple categories or search text to find specific types of places within the extent.

Note: You cannot permanently store places. Please see the Terms of use.

Note: Query parameters are case-sensitive.

Value

An sf object with columns

References

API Documentation

Examples

## Not run: 
within_extent(
  139.74,
  35.65,
  139.75,
  35.66,
  category_ids = "10001"
)

## End(Not run)

[Package arcgisplaces version 0.1.0 Index]