layers
A wrapper around the layer and layerDb API
Listing Objects
Section titled “Listing Objects”@dataclass(repr=False)class Listing(Generic[LISTINGID])A listing item of a collection
__repr__
Section titled “__repr__”def __repr__() -> strString representation of a Listing
html_str
Section titled “html_str”def html_str() -> strHTML representation for Jupyter notebooks
_repr_html_
Section titled “_repr_html_”def _repr_html_() -> strHTML representation for Jupyter notebooks
def load(timeout: int = 60) -> LayerCollection | LayerLoad the listing item
LayerListing Objects
Section titled “LayerListing Objects”@dataclass(repr=False)class LayerListing(Listing[LayerId])A layer listing as item of a collection
def load(timeout: int = 60) -> LayerCollection | LayerLoad the listing item
LayerCollectionListing Objects
Section titled “LayerCollectionListing Objects”@dataclass(repr=False)class LayerCollectionListing(Listing[LayerCollectionId])A layer listing as item of a collection
def load(timeout: int = 60) -> LayerCollection | LayerLoad the listing item
LayerCollection Objects
Section titled “LayerCollection Objects”class LayerCollection()A layer collection
__init__
Section titled “__init__”def __init__(name: str, description: str, collection_id: LayerCollectionId, provider_id: LayerProviderId, items: list[Listing]) -> NoneCreate a new LayerCollection
from_response
Section titled “from_response”@classmethoddef from_response( cls, response_pages: list[geoengine_api_client.LayerCollection]) -> LayerCollectionParse an HTTP JSON response to an LayerCollection
reload
Section titled “reload”def reload() -> LayerCollectionReload the layer collection
__repr__
Section titled “__repr__”def __repr__() -> strString representation of a LayerCollection
_repr_html_
Section titled “_repr_html_”def _repr_html_() -> str | NoneHTML representation for Jupyter notebooks
remove
Section titled “remove”def remove(timeout: int = 60) -> NoneRemove the layer collection itself
remove_item
Section titled “remove_item”def remove_item(index: int, timeout: int = 60)Remove a layer or collection from this collection
add_layer
Section titled “add_layer”def add_layer(name: str, description: str, workflow: dict[str, Any] | WorkflowBuilderOperator, symbology: Symbology | None, timeout: int = 60) -> LayerIdAdd a layer to this collection
add_layer_with_permissions
Section titled “add_layer_with_permissions”def add_layer_with_permissions(name: str, description: str, workflow: dict[str, Any] | WorkflowBuilderOperator, symbology: Symbology | None, permission_tuples: list[tuple[RoleId, Permission]] | None = None, timeout: int = 60) -> LayerIdAdd a layer to this collection and set permissions.
add_existing_layer
Section titled “add_existing_layer”def add_existing_layer(existing_layer: LayerListing | Layer | LayerId, timeout: int = 60)Add an existing layer to this collection
add_collection
Section titled “add_collection”def add_collection(name: str, description: str, timeout: int = 60) -> LayerCollectionIdAdd a collection to this collection
add_existing_collection
Section titled “add_existing_collection”def add_existing_collection(existing_collection: LayerCollectionListing | LayerCollection | LayerCollectionId, timeout: int = 60) -> LayerCollectionIdAdd an existing collection to this collection
get_items_by_name
Section titled “get_items_by_name”def get_items_by_name(name: str) -> list[Listing]Get all children with the given name
get_items_by_name_unique
Section titled “get_items_by_name_unique”def get_items_by_name_unique(name: str) -> Listing | NoneGet all children with the given name
search
Section titled “search”def search(search_string: str, *, search_type: Literal["fulltext", "prefix"] = "fulltext", offset: int = 0, limit: int = 20, timeout: int = 60) -> list[Listing]Search for a string in the layer collection
get_or_create_unique_collection
Section titled “get_or_create_unique_collection”def get_or_create_unique_collection( collection_name: str, create_collection_description: str | None = None, delete_existing_with_same_name: bool = False, create_permissions_tuples: list[tuple[RoleId, Permission]] | None = None) -> LayerCollectionGet a unique child by name OR if it does not exist create it. Removes existing collections with same name if forced! Sets permissions if the collection is created from a list of tuples
__eq__
Section titled “__eq__”def __eq__(other)Tests if two layer listings are identical
Layer Objects
Section titled “Layer Objects”@dataclass(repr=False)class Layer()A layer
workflow
Section titled “workflow”TODO: specify in more detail
properties
Section titled “properties”TODO: specify in more detail
metadata
Section titled “metadata”TODO: specify in more detail
__init__
Section titled “__init__”def __init__(name: str, description: str, layer_id: LayerId, provider_id: LayerProviderId, workflow: dict[str, Any], symbology: Symbology | None, properties: list[Any], metadata: dict[Any, Any]) -> NoneCreate a new Layer
from_response
Section titled “from_response”@classmethoddef from_response(cls, response: geoengine_api_client.Layer) -> LayerParse an HTTP JSON response to an Layer
__repr__
Section titled “__repr__”def __repr__() -> strString representation of a Layer
_repr_html_
Section titled “_repr_html_”def _repr_html_() -> str | NoneHTML representation for Jupyter notebooks
save_as_dataset
Section titled “save_as_dataset”def save_as_dataset(timeout: int = 60) -> TaskSave a layer as a new dataset.
to_api_dict
Section titled “to_api_dict”def to_api_dict() -> geoengine_api_client.LayerConvert to a dictionary that can be serialized to JSON
as_workflow_id
Section titled “as_workflow_id”def as_workflow_id(timeout: int = 60) -> WorkflowIdRegister a layer as a workflow and returns its workflowId
as_workflow
Section titled “as_workflow”def as_workflow(timeout: int = 60) -> WorkflowRegister a layer as a workflow and returns the workflow
layer_collection
Section titled “layer_collection”def layer_collection(layer_collection_id: LayerCollectionId | None = None, layer_provider_id: LayerProviderId = LAYER_DB_PROVIDER_ID, timeout: int = 60) -> LayerCollectionRetrieve a layer collection that contains layers and layer collections.
def layer(layer_id: LayerId, layer_provider_id: LayerProviderId = LAYER_DB_PROVIDER_ID, timeout: int = 60) -> LayerRetrieve a layer from the server.