SpatialDatasetEngine Interface¶
Last Updated: December 2019
All objects that implement the SpatialDatasetEngine
interface provide a minimum set of methods for interacting with layers and resources. Specifically, the methods allow the standard CRUD operations (Create, Read, Update, Delete) for both layers and resources.
All SpatialDatasetEngine
methods return a dictionary called the response dictionary. The Response dictionary contains an item named 'success'
whose value is a boolean indicating whether the operation was successful or not. If 'success'
is True
, then the the dictionary will also have a 'result'
key that contains the result of the operation. If 'success'
is False
, then the Response dictionary will contain an 'error'
key with information about what went wrong.
The following reference provides a summary of the base methods and properties provided by all SpatialDatasetEngine
objects.
Properties¶
SpatialDatasetEngine.
endpoint (string): URL for the spatial dataset service API endpoint.
SpatialDatasetEngine.
apikey (string, optional): API key may be used for authorization.
SpatialDatasetEngine.
username (string, optional): Username key may be used for authorization.
SpatialDatasetEngine.
password (string, optional): Password key may be used for authorization.
SpatialDatasetEngine.
type (string, readonly): Identifies the type of SpatialDatasetEngine
object.
Create Methods¶
- SpatialDatasetEngine.create_resource(resource_id, **kwargs)¶
Create a new resource.
- Parameters
resource_id (string) -- Identifier of the resource to create.
**kwargs (kwargs, optional) -- Any number of additional keyword arguments.
- Returns
Response dictionary
- Return type
(dict)
- SpatialDatasetEngine.create_layer(layer_id)¶
Create a new layer.
- Parameters
layer_id (string) -- Identifier of the layer to create.
- Returns
Response dictionary
- Return type
(dict)
Read Methods¶
- abstract SpatialDatasetEngine.get_resource(resource_id)¶
Retrieve a resource object.
- Parameters
resource_id (string) -- Identifier of the dataset to retrieve.
- Returns
Response dictionary
- Return type
(dict)
- abstract SpatialDatasetEngine.get_layer(layer_id)¶
Retrieve a single layer object.
- Parameters
layer_id (string) -- Identifier of the layer to retrieve.
- Returns
Response dictionary
- Return type
(dict)
- abstract SpatialDatasetEngine.list_resources()¶
List all resources available from the spatial dataset service.
- Returns
Response dictionary
- Return type
(dict)
- abstract SpatialDatasetEngine.list_layers()¶
List all layers available from the spatial dataset service.
- Returns
Response dictionary
- Return type
(dict)
Update Methods¶
- abstract SpatialDatasetEngine.update_resource(resource_id, **kwargs)¶
Update an existing resource.
- Parameters
resource_id (string) -- Identifier of the resource to update.
**kwargs (kwargs, optional) -- Any number of additional keyword arguments.
- Returns
Response dictionary
- Return type
(dict)
- abstract SpatialDatasetEngine.update_layer(layer_id, **kwargs)¶
Update an existing layer.
- Parameters
layer_id (string) -- Identifier of the layer to update.
**kwargs (kwargs, optional) -- Any number of additional keyword arguments.
- Returns
Response dictionary
- Return type
(dict)
Delete Methods¶
- abstract SpatialDatasetEngine.delete_resource(resource_id)¶
Delete a resource.
- Parameters
resource_id (string) -- Identifier of the resource to delete.
- Returns
Response dictionary
- Return type
(dict)
- abstract SpatialDatasetEngine.delete_layer(layer_id)¶
Delete a layer.
- Parameters
layer_id (string) -- Identifier of the layer to delete.
- Returns
Response dictionary
- Return type
(dict)