geodesic.boson.dataset.Dataset.from_arcgis_item#

static Dataset.from_arcgis_item(name, item_id, arcgis_instance='https://www.arcgis.com', feature_limit=None, credential=None, insecure=False, middleware={}, cache={}, tile_options={}, domain='*', category='*', type='*', **kwargs)[source]#

Creates a new Dataset from an ArcGIS Online/Enterprise item.

Parameters:
  • name (str) – name of the Dataset to create

  • item_id (str) – the item ID of the ArcGIS Item Referenced

  • arcgis_instance (str) – the base url of the ArcGIS Online or Enterprise root. Defaults to AGOL, MUST be specified for ArcGIS Enterprise instances

  • feature_limit (int | None) – the max number of features to return in a single page from a search. Defaults to whatever ArcGIS service’s default is (typically 2000)

  • credential (str | None) – the name or uid of a credential required to access this. Currently, this must be the client credentials of an ArcGIS OAuth2 Application. Public layers do not require credentials.

  • insecure (bool) – if True, will not verify SSL certificates. This is not recommended for production use.

  • layer_id – an integer layer ID to subset a service’s set of layers.

  • middleware (MiddlewareConfig | list) – configure any boson middleware to be applied to the new dataset.

  • cache (CacheConfig) – configure caching for this dataset

  • tile_options (TileOptions) – configure tile options for this dataset

  • domain (str) – domain of the resulting Object

  • category (str) – category of the resulting Object

  • type (str) – the type of the resulting Object

  • **kwargs – additional properties to set on the new Dataset

Returns:

a new Dataset

Return type:

Dataset

Examples

>>> ds = Dataset.from_arcgis_item(
...          name="my-dataset",
...          item_id="abc123efghj34234kxlk234joi",
...          credential="my-arcgis-creds"
... )
>>> ds.stage()
>>> # Staging is optional, but is a useful tool for validating configuration
>>> ds.save()