cubewerx.stratos
The CubeWerx Stratos Administration Interface. See the product documentation for an overview of the Stratos product itself.
Create a new Stratos object.
Arguments:
- deploymentUrl: The URL of a CubeWerx Stratos deployment. E.g., "https://somewhere.com/cubewerx/".
- username: The username (with an Administrator role) to log in as.
- password: the password of the specified username.
- authUrl: The URL of the CubeWerx Stratos Authentication Server to use (e.g., "https://somewhereelse.com/cubewerx/auth"), or None to use the one provided by the specified deployment.
- language: the user's preferred language(s) as a comma-separated list of RFC 4647 language tags (e.g., "en-CA,en,fr-CA,fr"), or None. Note that currently most of the strings that CubeWerx Stratos produces are available only in English.
If the login is unsuccessful for any reason, a LoginException
is raised. The reason can be ascertained by which specific
subclass is raised.
Raises:
NotAStratosException: The specified deploymentUrl is not a CubeWerx Stratos deployment.IncompatibleStratosVersionException: The CubeWerx Stratos Geospatial Data Server is not of a compatible version.NotAnAuthServerException: the specified authUrl is not a CubeWerx Stratos Authentication Server.AuthServerVersionTooLowException: The version number of the CubeWerx Stratos Authentication Server is too low.InvalidCredentialsException: Invalid username or password.NotAdministratorException: The user does not have Administrator privileges.LoginAttemptsTooFrequentException: Login attempts are being made too frequently.NoMoreSeatsException: No more seats are available for the user (not applicable for most servers).
The credentials of the CubeWerx Stratos administration user that we're logged in as. (read-only)
The x.y.z version number of the CubeWerx Stratos Geospatial Data Server. (read-only)
The full version string of the CubeWerx Stratos Geospatial Data Server. (read-only)
The license expiry date of the CubeWerx Stratos Geospatial Data Server, or None if the license has no expiry date. (read-only)
The user's preferred language(s) as a comma-separated list of RFC 4647 language tags (e.g., "en-CA,en,fr-CA,fr"), or None. Note that currently most of the strings that CubeWerx Stratos produces are available only in English.
The HTTP headers that must be added to manually-crafted admin API or OGC API server requests in order to pass the correct credentials and language preferences, etc. (read-only)
Fetch current system statistics.
Arguments:
- nPeriods: The number of time periods to return in the nActiveUsers list.
- nSecondsPerPeriod: The duration in seconds of each time period in the nActiveUsers list.
Returns:
A
Statsobject providing current system statistics.
Fetch a summary of the recent request history.
Arguments:
- maxPeriods: The maximum number of time periods (typically but not necessarily months, depending on configuration) to return.
Returns:
A summary of the recent request history.
Fetch a login history.
Arguments:
- username: The CwAuth user to fetch the login history of, or None to fetch the login history of all users.
- ipAddress: The IP address to fetch the login history of, or None to fetch the login history of all IP addresses. If an IPv4 address with less than four octets is specified, it matches all IP address beginning with the specified octets.
- fromTime: The start date and time inclusive (in the server's time zone) of the login history to fetch, or None to fetch back indefinitely.
- toTime: The end date and time inclusive (in the server's time zone) of the login history to fetch, or None to fetch to the current time.
- order: The chronological order of the returned entries, one of "forward" or "reverse".
- num: The maximum number of most-recent entries to return.
Returns:
A list of
LoginHistoryEntryobjects.
Fetch the available configuration parameters and their values.
Returns:
A dictionary mapping configuration parameter names to
ConfigParamobjects.
Fetch a list of CwAuth users.
Arguments:
- usernames: A list of usernames to fetch, or None/[] to fetch all users. If specified, the users will be returned in the specified order. If a specified username doesn't exist, it's omitted from the returned list.
Returns:
The list of all or selected CwAuth users of the Stratos Geospatial Data Server.
Fetch the specified CwAuth user.
Arguments:
- username: a username
Returns:
The CwAuth user with the specified username, or None if no such user exists.
Add a new CwAuth user to the Stratos Geospatial Data Server. If a user with the same username already exists, that user's definition is replaced.
Arguments:
- user: A CwAuth user definition. Must have an e-mail address and a password set.
Returns:
True if an existing user was replaced, or False if a new user was added.
Commit a CwAuth user update to the Stratos Geospatial Data Server. The intended flow is 1) fetch the definition of a user with Stratos.getAuthUsers() or Stratos.getAuthUser(), 2) update one or more properties of that user, and 3) call this method to commit those changes.
Arguments:
- user: A modified CwAuth user definition.
Remove the specified CwAuth user from the Stratos Geospatial Data Server. The special "admin" user cannot be removed.
Note that if this AuthUser is in an AuthUser list that was
fetched via a call to Stratos.getAuthUsers(), the object isn't
automatically removed from the list. It's up to the caller to
do that if necessary.
Arguments:
- user: A CwAuth user definition or username.
Returns:
True if the user was removed, or False if the user didn't exist.
Fetch a list of roles.
Arguments:
- roleNames: A list of role names to fetch, or None/[] to fetch all roles; if specified, the roles will be returned in the specified order. If a specified role name doesn't exist, it's omitted from the returned list.
Returns:
The list of all or selected roles of the Stratos Geospatial Data Server.
Fetch the specified role.
Arguments:
- roleName: A role name.
Returns:
The role with the specified name, or None if no such role exists.
Add a new role to the Stratos Geospatial Data Server. If a role with the same name already exists, that role's definition is replaced.
Arguments:
- role: A role definition.
Returns:
True if an existing role was replaced, or False if a new role was added.
Commit a CwAuth role update to the Stratos Geospatial Data Server. The intended flow is 1) fetch the definition of a role with Stratos.getRoles() or Stratos.getRole(), 2) update one or more properties of that role, and 3) call this method to commit those changes.
Arguments:
- role: A modified role definition.
Remove the specified role from the Stratos Geospatial Data Server. Built-in roles such as "Administrator" cannot be removed. (This can be checked with role.isBuiltin.)
Arguments:
- role: A role definition or role name.
Returns:
True if the role was removed, or False if the role didn't exist.
Fetch the list of API keys.
Returns:
The list of all API keys of the Stratos Geospatial Data Server.
Fetch the specified API key.
Arguments:
- key: An API key string.
Returns:
The API key with the specified key string, or None if no such API key exists.
Add a new API key to the Stratos Geospatial Data Server. If an API key with the same key string already exists, that API key's definition is replaced. If apiKey.key isn't set, the server will auto-generate a key string and set apiKey.key accordingly.
Arguments:
- apiKey: An API key definition.
Returns:
True if an existing API key was replaced, or False if a new API key was added.
Commit an API key update to the Stratos Geospatial Data Server. The intended flow is 1) fetch the definition of an API key with Stratos.getApiKeys() or Stratos.getApiKey(), 2) update one or more properties of that API key, and 3) call this method to commit those changes.
Arguments:
- apiKey: A modified API key definition.
Remove the specified API key from the Stratos Geospatial Data Server.
Arguments:
- apiKey: An API key definition or key string.
Returns:
True if the API key was removed, or False if the API key didn't exist.
Fetch the list of quotas.
Returns:
The list of the current quotas that are in place in the Stratos Geospatial Data Server.
Fetch the specified quota.
Arguments:
- id: A quota ID.
Returns:
The quota with the specified ID, or None if no such quota exists.
Add a new quota. Note that quotas are not active unless the value of the audit.quotas.enable configuration parameter is set to true.
Arguments:
- identityType: The type of identity that this quota is on.
- identity: The identity (username, role or API key) that this quota is on. The specified username, role or API key must exist.
- field: The thing being quotad.
- service: The service (as known by CubeWerx Stratos Analytics) that this quota applies to. E.g., "WMS", "WMTS", "WCS", "WFS", "WPS", "CSW", or "*" if the quota applies to all services.
- operation: The operation (as known by CubeWerx Stratos Analytics) that this quota applies to. (e.g., "GetMap", "GetFeature"), or "*" if the quota applies to all operations.
- granularity: The granularity of this quota (i.e., what unit of time it applies to).
- limit: The limit that this quota imposes.
- usage: The current usage (which will be automatically reset at the beginning of every unit of time specified by the granularity field).
Returns:
The new quota.
Update the limit and/or usage of a quota.
Arguments:
- quota: A
Quotaobject or ID. - limit: The new limit that this quota imposes, or None to not change.
- usage: The new current usage (which will be automatically reset at the beginning of every unit of time specified by the granularity field), or None to not change.
Remove the specified quota from the Stratos Geospatial Data Server.
Arguments:
- quota: A
Quotaobject or ID.
Returns:
True if the quota was removed, or False if the quota didn't exist.
Fetch the list of CubeSTOR database details.
Returns:
The list of all CubeSTOR databases of the Stratos Geospatial Data Server.
Fetch the details of the specified CubeSTOR database.
Arguments:
- name: A CubeSTOR database name.
Returns:
The details of the CubeSTOR database with the specified name, or None if no such database exists.
Add a new CubeSTOR database to the Stratos Geospatial Data Server.
Arguments:
- name: The name of the CubeSTOR database name to create. The name must be no longer than 64 characters, and must not contain a backtick or a slash. There are a few other restrictions as well; CubestorDatabase.isValidName() can be called to check the validity of a name.
- title: The title of the database, or None.
- description: A short description of the database, or None.
Returns:
The new CubeSTOR database details.
Update the title and/or description of a CubeSTOR database.
Arguments:
- cubestorDatabase: A CubeSTOR database details object or database name.
- title: the new title of the database, "" to clear the title, or None to not change.
- description: The new short description of the database, "" to clear the description, or None to not change.
Remove the specified CubeSTOR database from the Stratos
Geospatial Data Server. WARNING: This will remove any and all
data that has been loaded into this database. Some databases
cannot be removed (determinable by the canDelete property
of the CubestorDatabase object). One such situation is if the
CubeSTOR database is currently the source of of a data store.
In this situation, the database must first be removed as the
source of the data store (e.g., by setting dataStore.source to
None and then calling dataStore.commitUpdates(), or by calling
Stratos.removeDataStore()).
Note that if this CubestorDatabase is in a CubestorDatabase
list that was fetched via a call to Stratos.getCubestorDatabases(),
the object isn't automatically removed from the list. It's up to
the caller to do that if necessary.
Arguments:
- cubestorDatabase: A CubeSTOR database details object or database name.
Returns:
True if the CubeSTOR database was removed, or False if the CubeSTOR database didn't exist.
Fetch the list of CubeWerx Stratos data stores. A data store is a data source (dataset) that's exposed as a set of web services with full access control, etc.
Returns:
The list of all data stores of the Stratos Geospatial Data Server.
Fetch the specified CubeWerx Stratos data store.
Arguments:
- id: a data store ID
Returns:
The CubeWerx Stratos data store with the specified ID, or None if no such data store exists.
Add a new data store to the Stratos Geospatial Data Server. If a data store with the same ID already exists, that data store's definition is replaced.
Arguments:
- dataStore: A data store definition. Must have a data store type and source set.
Returns:
True if an existing data store was replaced, or False if a new data store was added.
Commit data store updates to the Stratos Geospatial Data Server. This is the same as calling DataStore.commitUpdates(). The intended flow is 1) fetch the definition of a data store with Stratos.getDataStores() or Stratos.getDataStore(), 2) update one or more properties of that data store, and 3) call this method (or DataStore.commitUpdates()) to commit those changes.
Arguments:
- dataStore: A modified data store definition.
Remove the specified data store from the Stratos Geospatial
Data Server. Some data stores cannot be removed (determinable
by the canDelete property of the DataStore object).
Note that if this DataStore is in a DataStore list that
was fetched via a call to Stratos.getDataStores(), the object
isn't automatically removed from the list. It's up to the
caller to do that if necessary.
Arguments:
- dataStore: A data store definition or ID.
Returns:
True if the data store was removed, or False if the data store didn't exist.
Fetch the access control rules that are currently in place
for the processing server (i.e., the OGC WPS and the "OGC API -
Processes" endpoints. These access control rules can be modified
and then sent back to the server with a call to
setProcessingAcrs.
Returns:
The access control rules that are currently in place for the processing server (i.e., the OGC WPS and the "OGC API - Processes" endpoints).
Set the access control rules for the processing server (i.e., the OGC WPS and the "OGC API - Processes" endpoints). These access control rules must not refer to any content, and must not have any "except" clauses. The only operation classes they should grant are EXECUTE_PROCESS and MANAGE_PROCESSES.
Arguments:
- accessControlRules: The new set of access control rules to put in place for the processing server (i.e., the OGC WPS and the "OGC API - Processes" endpoints).
Fetch the list of CubeWerx Stratos catalogues.
Returns:
The list of all catalogues of the Stratos Geospatial Data Server.
Fetch the specified CubeWerx Stratos catalogue.
Arguments:
- id: a catalogue ID
Returns:
The CubeWerx Stratos catalogue with the specified ID, or None if no such catalogue exists.
Add a new catalogue to the Stratos Geospatial Data Server.
Arguments:
- id: The ID to give the catalogue. The Stratos Geospatial Data Server must not already have a catalogue with this ID. The ID must be no longer than 64 characters, and must not contain a backtick or a slash. There are a few other restrictions as well; Catalogue.isValidId() can be called to check the validity of an ID.
- title: A title to give the catalogue, or None.
- description: A brief textual description to give the catalogue, or None.
- keywords: A set of searcheable keywords for the catalogue, or None.
- accessControlRules: The set of access control rules to put in put in place for the catalogue. Each rule must have exactly one "grant" clause and no "except" clauses. The one "grant" clause must not refer to any content, and must not list operation classes other than GET_RECORD, INSERT_RECORD, UPDATE_RECORD, DELETE_RECORD and HARVEST_RECORDS.
- blocking: If False, the method will return immediately with a Job object and the creation of the catalogue will proceed concurrently. The progress of the catalogue creation can be monitored through the returned Job object. If True, the method won't return until the catalogue is fully created (useful for scripting), in which case a Catalogue object is returned.
- showProgress: Whether or not to report the catalogue-creation progress to stdout. Only relevant if blocking=True.
Returns:
A job (that can be monitored for progress), or a Catalogue object representing the new catalogue if blocking was specified as True.
Commit catalogue updates to the Stratos Geospatial Data Server. This is the same as calling Catalogue.commitUpdates(). The intended flow is 1) fetch the definition of a catalogue with Stratos.getCatalogues() or Stratos.getCatalogue(), 2) update one or more properties of that catalogue, and 3) call this method (or Catalogue.commitUpdates()) to commit those changes.
Arguments:
- catalogue: A catalogue.
Remove the specified catalogue from the Stratos Geospatial Data Server.
Note that if this Catalogue is in a Catalogue list that
was fetched via a call to Stratos.getCatalogues(), the object
isn't automatically removed from the list. It's up to the
caller to do that if necessary.
Arguments:
- catalogue: A
Catalogueobject or ID.
Returns:
True if the catalogue was removed, or False if the catalogue didn't exist.
A CubeWerx Access Control Rule.
A rule grants whatever is specified by the "grant" clauses minus whatever is specified by the "except" clauses.
Create a new access control rule.
Arguments:
- jsonRep: A dictionary supplying properties. Do not specify; for internal use only.
The identities that this rule applies to. A specific syntax is required for each identity. E.g., "cwAuth{*}", "cwAuth{jsmith}", "cwAuth{%Analyst}", "oidConnect{mySub@https://myIssuer.com}", "oidConnect{https://myIssuer.com}", "ipAddress{20.76.201.171}", ipAddress{20.76.201}", "everybody".
When this rule expires, or None for never. After this date and time, the rule ceases to grant access.
The clauses that indicate exceptions to what's being granted by this rule. Note that these clauses do not revoke any access that may be granted by another rule.
A CubeWerx Access Control Rule Clause.
There are two types of rule clauses: "grant" and "except". A "grant" clause specifies the operation classes that are being granted, and the content that is being granted for those operations. If no operation classes are specified, it means "all operations". Similarly, if no content is specified, it means "all content".
An "except" clause specifies exceptions to what's being granted by the rule. It does not cause the rule to revoke any access that may be granted by another rule.
Create a new access control rule clause.
Arguments:
- jsonRep: A dictionary supplying properties; do not specify; for internal use only.
The operation classes that are being granted (or excepted in the case of an "except" clause). If empty, all operation classes are granted (or excepted).
The content that's being granted (or excepted in the case of an "except" clause). If empty, all content is granted (or excepted).
An API key.
To create a new API key, create a new ApiKey object (either
specifying the desired key string or letting the server
auto-generate one for you), set any other desired properties,
and call Stratos.addOrReplaceApiKey().
To change the details of an existing API key, fetch the ApiKey
object via Stratos.getApiKeys() or Stratos.getApiKey(), update one
or more properties of tha API key, and call Stratos.updateApiKey()
object to commit those changes.
To remove an API key, call Stratos.removeApiKey().
Create a new ApiKey object.
Arguments:
- key: The desired API key string, or ""/None to let the server auto-generate one. An API key string cannot contain a "/" character.
- dictionary: A dictionary supplying properties. Do not specify; for internal use only.
A reference to a source of polygons, multi-surfaces and/or envelopes to be used for access control.
Create a new area-source reference.
Arguments:
- urlOrFilePath: A URL or local file path (absolute or relative to the server URL or directory) to the source, or None (but then required to be set via the property).
- format: The name of the convert-library driver that should be used to read this source (e.g., "GeoJSON", "shape"), or None. If None, an attempt will be made to sniff the format.
- where: A CQL2 WHERE clause filter to select a subset of the geometries, or None to apply no filter.
A URL or local file path (absolute or relative to the server URL or directory) to the source, or None.
A CubeWerx Stratos CwAuth user account.
To create a new CubeWerx Stratos CwAuth user, create a new AuthUser
object (specifying the desired username), set the required e-mail
address and password for the user, set any other desired properties,
and call Stratos.addOrReplaceAuthUser().
To change the details of an existing CubeWerx Stratos CwAuth user
account, fetch the AuthUser object via the Stratos.getAuthUsers()
or Stratos.getAuthUser(), update one or more properties of that user,
and call Stratos.updateAuthUser() to commit those changes.
To remove a CubeWerx Stratos CwAuth user account, call Stratos.removeAuthUser().
Create a new AuthUser object.
Arguments:
- username: The user's username. Each CubeWerx Stratos CwAuth user account must have a unique username. Required unless supplied via the dictionary parameter.
- dictionary: A dictionary supplying properties. Do not specify; for internal use only.
The first (given) name of this CubeWerx Stratos CwAuth user account (possibly also with middle name(s) and/or initial(s)), or None.
The last (family) name (i.e., surname) of this CubeWerx Stratos CwAuth user account, or None.
An appropriate name to display for this CubeWerx Stratos CwAuth user account, either the user's first and/or last name if set, or the user's username otherwise. (read-only)
The list of roles that this CubeWerx Stratos CwAuth user
account has. These are the role names only. To get the full
Role objects (for descriptions, etc.), pass this list to
Stratos.getRoles(). This list of roles can be re-specified with
a user.roles = [...] assignment. However, to add or remove a
role to/from the existing list, use AuthUser.addRole() or
AuthUser.removeRole() rather than user.roles.append() or
user.roles.remove().
Add a role to this CubeWerx Stratos CwAuth user account.
Arguments:
- roleName: The name of the role to add to this CubeWerx Stratos CwAuth user account. The specified role must exist. If the user already has this role, this is a no-op.
Remove a role from this CubeWerx Stratos CwAuth user account.
Arguments:
- roleName: The name of the role to remove (revoke) from this CubeWerx Stratos CwAuth user account. If the user doesn't have this role, this is a no-op.
The maximum number of times this CubeWerx Stratos CwAuth user account can be logged in, or None.
Is this CubeWerx Stratos CwAuth user account enabled (i.e., can users sign in with this account)?
The password for this CubeWerx Stratos CwAuth user account, or None. Note that none of the user information returned by Stratos.getAuthUsers() or Stratos.getAuthUser() will include a password. However, a password must be set when calling Stratos.addOrReplaceAuthUser().
Whether or not the specified username is a valid username for a CwAuth user. WARNING: This will return a string (not False) if the username is not valid, so be sure test with "is True" or "is not True".
Arguments:
- username: The username to test.
Returns:
True if the specified username is a valid username for a CwAuth user, or a short string describing why it isn't.
The current usage summary of a specific category of the Stratos server cache.
A CubeWerx Stratos catalogue.
Do not instantiate directly. To get a list of catalogues or a specific catalogue, call Stratos.getCatalogues() or Stratos.getCatalogue() respectively. To create a new catalogue, call Stratos.addCatalogue().
To change the details of an existing catalogue, update one or more
properties of the Catalogue object and call Catalogue.commitUpdates()
or Stratos.updateCatalogue() to commit those changes.
To remove a catalogue, call Stratos.removeCatalogue().
The set of access control rules for this catalogue. Each
rule must have exactly one "grant" clause and no "except"
clauses. The one "grant" clause must not refer to any content,
and must not list operation classes other than GET_RECORD,
INSERT_RECORD, UPDATE_RECORD, DELETE_RECORD and HARVEST_RECORDS.
Like most of the other Catalogue properties, this can be
adjusted, but adjustments will not be commited to the server
until Catalogue.commitUpdates() or Stratos.updateCatalogue()
is called.
Harvests (or reharvests) the resource(s) at the specified URL.
Note that if blocking is specified as False, the nRecords and
harvestedUrls properties will not get automatically updated.
The updateFromServer() method can be called after the job is
complete to update these properties to their new values.
Arguments:
- url: The URL to (re)harvest. This can also be an absolute path in the server's filesystem.
- resourceType: The expected resource type.
- blocking: If False, the method will return immediately with a Job object and the harvest operation will proceed concurrently. The progress of the harvest can be monitored through the returned Job object. If True, the method won't return until the harvest is complete (useful for scripting), in which case True is returned.
- showProgress: Whether or not to report the progress of the harvest to stdout. Only relevant if blocking=True.
Returns:
A job (that can be monitored for progress), or the resulting
HarvestedUrlif blocking was specified as True.
Unharvests the resource(s) that were harvested from the specified URL.
Arguments:
- harvestedUrl: A
HarvestedUrlobject or ID (note: not the actual URL).
Updates the properties to match their new actual values.
This is useful, for example, after performing a non-blocking
harvest().
Returns:
True if successful, or False if this catalogue no longer exists.
Whether or not the specified ID is a valid ID for a catalogue. WARNING: This will return a string (not False) if the ID is not valid, so be sure test with "is True" or "is not True".
Arguments:
- id: The ID to test.
Returns:
True if the specified ID is a valid ID for a catalogue, or a short string describing why it isn't.
The details of a CubeWerx Stratos configuration parameter.
The list of allowed case-insensitive values of this configuration parameter if of type ENUMERATED, or None otherwise. (read-only)
Whether or not this is a global configuration parameter that affects all deployments. (read-only)
The string representation of the default value of this configuration parameter. (read-only)
The default value of this configuration parameter, expressed as the appropriate Python type according to the following table:
Config Param Type Python type
----------------- -----------
BOOLEAN bool
NUMBER float (can be math.inf)
STRING str
PASSWORD str
PERCENTAGE float (0..100)
URL str
DURATION float (in seconds)
ENUMERATED str
MULTILINGUAL_STRING cubewerx.stratos.MultilingualString
STRING_LIST list[str]
STRING_MAP dict[str,str]
JSON bool|int|float|str|list|dict
(read-only)
The string representation of the value that's explicitly set for this configuration parameter, or None if the default value is active. Setting this (or clearing it by setting it to None) will automatically update the server.
The value that's explicitly set for this configuration parameter, expressed as the appropriate Python type, or None if the default value is active. Setting this (or clearing it by setting it to None) will automatically update the server.
Config Param Type Python type
----------------- -----------
BOOLEAN bool
NUMBER float (can be math.inf)
STRING str
PASSWORD str
PERCENTAGE float (0..100)
URL str
DURATION float (in seconds)
ENUMERATED str
MULTILINGUAL_STRING cubewerx.stratos.MultilingualString
STRING_LIST list[str]
STRING_MAP dict[str,str]
JSON bool|int|float|str|list|dict
An enumeration of the configuration parameter types.
The content that's being granted (or excepted in the case of an "except" clause).
Within a "grant" clause, content is all-inclusive by default. That is, if no spatial area is specified, it means "everywhere", if no feature filters are specified, it means "all features", and if no property names are specified, it means "all properties". Within an "except" clause, however, content is all-inclusive by default only if it's empty (other than the required "name" property). Otherwise it only includes (excepts) the mentioned thing(s).
Create a new content reference.
Arguments:
- name: The name/ID of the feature set, layer or process that's being granted (or excepted in the case of an "except" clause), or "*" for all. Required unless supplied via the jsonRep parameter.
- jsonRep: a dictionary supplying properties. Do not specify; for internal use only.
The name/ID of the feature set, layer or process that's being granted (or excepted in the case of an "except" clause), or "*" for all.
The spatial areas that are being granted (or excepted in the case of an "except" clause).
The level of detail to grant access to, expressed as a
minimum scale denominator (e.g., a minimum scale denominator of
100000 indicates that no detail finer than a scale of 1/100000
should be granted), or None to not limit level of detail in this
way. The lower the specified number, the more detail is granted.
This is mutually exclusive with the finestResolution property.
I.e., setting this property, even to None, automatically sets the
finestResolution property to None.
The level of detail to grant access to, expressed as a
dictionary with a "resolution" field indicating a resolution
(i.e., units per pixel) and a "crs" field indicating the
coordinate reference system that the resolution should be
interpreted with respect to (e.g., { "resolution": 10000, "crs":
"EPSG:3857" }), or None to not limit level of detail in this
way. The lower the specified number, the more detail is granted.
This is mutually exclusive with the minScaleDenominator property
I.e., setting this property, even to None, automatically sets the
minScaleDenominator property to None.
A CQL2 WHERE clause filter that limits feature-set content to only those features that pass through the filter, or None to apply no filter.
The credentials of the CubeWerx Stratos administration user that we're logged in as.
The first name of this CubeWerx Stratos CwAuth user account (possibly also with middle name(s) and/or initial(s)), or None. (read-only)
The last name of this CubeWerx Stratos CwAuth user account, or None. (read-only)
An appropriate name to display for this CubeWerx Stratos CwAuth user account, either the user's first and/or last name if set, or the user's username otherwise. (read-only)
The e-mail address of this CubeWerx Stratos CwAuth user account, or None. (read-only)
The list of roles that this CubeWerx Stratos CwAuth user
account has. These are the role names only. To get the full
Role objects (for descriptions, etc.), pass this list to
Stratos.getRoles(). (read-only)
The details of a CubeSTOR database.
Do not instantiate directly. To get a list of CubeSTOR database details or the details of a specific CubeSTOR database, call Stratos.getCubestorDatabases() or Stratos.getCubestorDatabase() respectively. To create, update or remove a CubeSTOR database, call Stratos.addCubestorDatabase(), Stratos.updateCubestorDatabase() or Stratos.removeCubestorDatabase() respectively.
The ID of the data store that this CubeSTOR database is the source of, or None if this CubeSTOR database is not the source of any data store. (read-only)
Whether or not this CubeSTOR database can currently be removed through this API. (read-only)
Whether or not the specified name is a valid name for a CubeSTOR database. WARNING: This will return a string (not False) if the name is not valid, so be sure test with "is True" or "is not True".
Arguments:
- name: The name to test.
Returns:
True if the specified name is a valid name for a CubeSTOR database, or a short string describing why it isn't.
A CubeWerx Stratos data store. A data store is a data source (dataset) that's exposed as a set of web services with full access control, etc. Only data stores of type "cubestor" will have the full power of tiling, scalability and efficiency.
To create a new CubeWerx Stratos data store, create a new DataStore
object (specifying the desired ID), set the required data store
type and source properties, set any other desired properties,
and call Stratos.addOrReplaceDataStore().
To change the details of an existing CubeWerx Stratos data store,
fetch the DataStore object via Stratos.getDataStores() or
Stratos.getDataStore(), update one or more properties of that data
store, and call DataStore.commitUpdates() or Stratos.updateDataStore()
to commit those changes. Layer manipulation is an exception; any
changes to the layers of a data store are updated on the server
immediately.
To remove a CubeWerx Stratos data store, call Stratos.removeDataStore().
Create a new DataStore object.
Arguments:
- id: The desired ID of the data store. Each data store must have a unique ID. The ID must not contain a colon or a slash, and must not be one of the two reserved values "processing" or "catalogues". DataStore.isValidId() can be called to check the validity of an ID. Required unless supplied via the jsonRep parameter.
- jsonRep: A dictionary supplying properties. Do not specify; for internal use only.
The type of data store (i.e., the type of its source). Valid values are "cubestor" (for a CubeSTOR database), "oradb" (for a CubeWerx OraDB database), "ogcapi" (for an OGC API Service), "wms" (for an OGC Web Map Service), "wmts" (for an OGC Web Map Tile Service), "wfs" (for an OGC Web Map Feature Service), "arcgismap" for an ESRI® ArcGIS® Map service, and "GeoJSON" (for a GeoJSON source).
The name (for data stores of type "cubestor"), connect string (for data stores of type "oradb") or URL (for all other data store types) of the source of the data store. For data stores of type "cubestor", it's recommended that the GUI admin client fetch the list of available CubeSTOR databases via a call to Stratos.getCubestorDatabases() and present them in a drop-down list.
The title of this data store, or None. If None, the title of the source is used.
A brief textual description of this data store, or None. If None, the description of the source is used.
A human-readable attribution for this data store, or None.
A human-readable attribution (with HTML markup) for this data store, or None; overrides both attributionTitle and attributionUrl.
A URL of a logo to display for the attribution of this data store, or None.
Human-readable text describing how this data store is licensed, or None.
Human-readable text (with HTML markup) describing how this data store is licensed, or None. Overrides both licenseTitle and licenseUrl.
Whether or not the source of this data store is an external service that CubeWerx Stratos clients can access directly. If True, the Stratos Geospatial Data Server may redirect certain client requests directly to the source server for more efficient operation.
The CubeWerx Stratos WMS and WMTS web services are capable of combining multiple data stores into a single set of offerings, and furthermore are capable of providing their the list of available layers as a hierarchical set of themes. Normally each data store served by such a web service is given its own top-level theme. Setting this to True will disable this behavour for this data store, putting the offerings of this data store (which may themselves be organized by a theme hierarchy) directly as top-level items.
A URL to a Styled-Layer Descriptor (SLD) document providing a set of styles for (and therefore defining the layers of) the coverages and/or feature sets provided by the source of this data store. Not necessary if the data store source provides its own layers and styles.
A URL to a Styled-Layer Descriptor (SLD) document providing an additional set of styles for the coverages and/or feature sets provided by the source of this data store, augmenting what may be provided by the data store source or by the stylesUrl field.
Whether or not to provide a set of spectral-index styles for the coverages of this data store. For each coverage, only the spectral-index styles that are compatible with the channels/bands of that coverage will be provided.
Some data store types (such as "cubestor", "ogcapi", and "wmts") are capable of natively providing map tiles, while others aren't. Setting this gives the Stratos Geospatial Data Server permission to provide a tile interface by making tile-sized map requests to the data store source. The value is a list of coordinate-reference-system strings indicating the coordinate reference systems that such simulated tiles should be provided in. It's common to provide tiles in at least the Web Mercator (EPSG:3857) coordinate reference system. This should only be set to a non-empty list if the data store source is incapable of natively providing map tiles.
A set of hints to provide to the CubeWerx Stratos convert library to help it understand or process the data store sources. Black magic.
The set of access control rules for this data store. Like
most of the other DataStore properties, this can be adjusted,
but adjustments will not be commited to the server until
DataStore.commitUpdates() or Stratos.updateDataStore() is
called.
Whether or not layers can be added to or removed from this
data store, and whether or not the contents of the layers of
this data store can be managed. True if and only if the data
store is of type "cubestor" and is part of a Stratos Geospatial
Data Server. I.e., if the caller manually creates a new
DataStore object, it can't be managed until
Stratos.addOrReplaceDataStore() is called. (read-only)
The URL of the OGC API landing page for this data store, or None if the data store is not yet associated with a Stratos Geospatial Data Server. (read-only)
Return the list of layers (feature sets) that this data store provides.
Arguments:
- forceRefetch: If True, the list of layers is (re-)fetched from the server even if a cached copy exists.
Returns:
The list of layers that this data store provides.
Return the specified layer (feature set) within this data store.
Arguments:
- layerId: a layer ID
- forceRefetch: If True, the list of layers is (re-)fetched from the server even if a cached copy exists.
Returns:
The layer with the specified ID, or None if no such layer exists in this data store.
Add a vector layer to this data store. This can only be done for data stores whose DataStore.canBeManaged property is True. The layer is immediately added to the Stratos Geospatial Data Server; there's no need to call DataStore.commitUpdates() to commit the addition.
Arguments:
- id: The ID to give the layer. The data store must not already have a layer with this ID. The ID must be no longer than 64 characters, and must not contain a backtick or a slash. There are a few other restrictions as well; Layer.isValidId() can be called to check the validity of an ID.
- jsonSchema: The JSON schema describing the data that will be loaded into this layer, or None. It can be passed as an object (like what json.load() provides), a string representation of the schema, or a file path or URL to a JSON schema. As per "OGC API - Features - Part 5: Schemas", if a property is marked with "x-ogc-role": "primary-geometry", then it's considered the property that will hold the feature's primary geometry. If no geometry property is present, one will be automatically added. If the schema is specified as None, the features of the resulting layer will have no properties (other than its geometry).
- title: A title to give the layer, or None.
- description: A brief textual description to give the layer, or None.
- addDefaultStyle: Whether or not to automatically add a default style (with an ID of "default") to the layer, making maps and map tiles available for it.
Returns:
The new vector layer.
Add a vector layer to this data store and populate it with some initial data. The schema of the layer will be sniffed from this initial data. This can only be done for data stores whose DataStore.canBeManaged property is True. The layer is immediately added to the Stratos Geospatial Data Server; there's no need to call DataStore.commitUpdates() to commit the addition.
You will eventually need to call Layer.updateTiles() to incorporate this new data into the map and data tiles of the layer (but not until the job is complete!).
Arguments:
- id: The ID to give the layer. The data store must not already have a layer with this ID. The ID must be no longer than 64 characters, and must not contain a backtick or a slash. There are a few other restrictions as well; Layer.isValidId() can be called to check the validity of an ID. filePathsOrFeatureCollection: Either a list of one or more fully-qualified local file paths of source vector data to be loaded (including any necessary auxilliary files), or a GeoJSON FeatureCollection to be loaded. It's also possible to specify a single-element list consisting of the fully-qualified local file path of a ZIP file containing the source data to load, as long as it meets the following requirements: a) it's the only specified file, b) it has a '.zip' suffix, and c) it consists only of files or of exactly one directory whose contents exist only of files. title: A title to give the layer, or None. description: A brief textual description to give the layer, or None. dataCoordSys: The coordinate system that the data is in (e.g. "http://www.opengis.net/def/crs/OGC/1.3/CRS84"), or None to auto-detect. nominalResM: The nominal resolution of this data in metres, or None to autodetect. This helps the server know how deep to pregenerate tiles. addDefaultStyle: Whether or not to automatically add a default style (with an ID of "default") to the layer, making maps and map tiles available for it.
Returns:
The new vector layer, or a job (that can be monitored for progress) if the creation of the layer needs to be performed asynchronously. Currently the latter occurs when one or more file paths are specified.
Add a coverage layer to this data store. This can only be done for data stores whose DataStore.canBeManaged property is True. The layer is immediately added to the Stratos Geospatial Data Server; there's no need to call DataStore.commitUpdates() to commit the addition.
Arguments:
- id: The ID to give the layer. The data store must not already have a layer with this ID. The ID must be no longer than 64 characters, and must not contain a backtick or a slash. There are a few other restrictions as well; Layer.isValidId() can be called to check the validity of an ID. title: A title to give the layer, or None. description: A brief textual description to give the layer, or None. addDefaultStyle: Whether or not to automatically add a default style (with an ID of "default") to the layer, making maps and map tiles available for it.
Returns:
The new coverage layer.
Remove a layer from this data store. This can only be done for data stores whose DataStore.canBeManaged property is True, and should only be done if no tile update is in progress for the layer. The layer is immediately removed from the Stratos Geospatial Data Server; there's no need to call DataStore.commitUpdates() to commit the removal.
WARNING: This will remove all data associated with the layer!!! This could be catastrophic if done unintentionally, so be careful!
Arguments:
- layer: A
Layerobject or ID.
Returns:
True if the layer was removed, or False if the layer didn't exist.
Whether or not the specified ID is a valid ID for a data store. WARNING: This will return a string (not False) if the ID is not valid, so be sure test with "is True" or "is not True".
Arguments:
- id: The ID to test.
Returns:
True if the specified ID is a valid ID for a data store, or a short string describing why it isn't.
A URL harvested by a CubeWerx Stratos catalogue.
An enumeration of the different resurce types that can be harvested by the catalogue.
An asynchronous job that can be monitored for progress.
Do not instantiate directly.
The status of the job. Typical values are "running", "successful" and "failed". (read-only)
Whether or not the job has completed unsuccessfully.
If True, the exception property will typically contain
the reason for the failure. (read-only)
A layer (called a "collection" in the OGC API) that's available through a data store.
Do not instantiate directly. To add a layer to a data store, call either DataStore.addVectorLayer() or DataStore.addCoverageLayer().
The title of this layer, or None. Setting this (or clearing it by setting it to the empty string or None) will automatically update the server.
A brief textual description of this layer, or None. Setting this (or clearing it by setting it to the empty string or None) will automatically update the server.
The WGS 84 Geographic bounding box of this layer ([minLon, minLat, maxLon, maxLat]), or None. If minLon > maxLon, then the bounding box spans the antimeridian. (read-only)
The styles available for this layer. (read-only) To manipulate styles, see Layer.addStyle(), Layer.removeStyle() and Style.update().
The progress (as a percentage from 0 to 100) of the current or last tile-update job for this layer. (read-only)
Return a map of the layer as an image in the Spherical
Mercator (EPSG:3857) coordinate system. This can only be done
if isMappable. Note that the map might not show source images
or vector features that were very recently added, as the tiling
of this new data might not yet be complete.
Arguments:
- width: The width of the map in pixels, or None for auto.
- height: The height of the map in pixels, or None for auto.
- wgs84Extent: The WGS 84 Geographic spatial extent of the area of interest (expressed as [minLon, minLat, maxLon, maxLat]), or None to request a map of the entire layer.
- style: The style to use (either a Style object or the ID/Name of the style), or None to use the default style.
Returns:
The requested map image.
Return the number vector features in this layer.
Arguments:
- wgs84Extent: The WGS 84 Geographic spatial extent of the area of interest (expressed as a GeoJSON Polygon or as a [minLon, minLat, maxLon, maxLat] array), or None to request the number of features of the entire layer.
- relation: The spatial relation to use when comparing against the specified wgs84Extent, or None for the default (INTERSECTS)
Returns:
The number of vector features in this layer.
Fetch the vector features of this layer. This can only be done
if isVectors.
Arguments:
- wgs84Extent: The WGS 84 Geographic spatial extent of the area of interest (expressed as a GeoJSON Polygon or as a [minLon, minLat, maxLon, maxLat] array), or None to request the features of the entire layer.
- relation: The spatial relation to use when comparing against the specified wgs84Extent, or None for the default (INTERSECTS)
- limit: The maximum number of vector features to return, or None to let the server decide.
- offset: The zero-based start index of the first feature to return. Useful for paging.
- simplifyToScale: The scale (ratio of the distance on the map to the corresponding distance on the ground) to simplify the geometries to, or None to not simplify.
Returns:
The vector features of this layer.
Add one or more vector features to this layer. This can only
be done if canBeManaged and isVectors. Note that this does
not update the wgs84Extent property of the Layer object.
You will eventually need to call Layer.updateTiles() to incorporate this new data into the map and data tiles of the layer (but not until the job is complete!).
Arguments:
- filePathsOrFeatureCollection: Either a list of one or more fully-qualified local file paths of source vector data to be loaded (including any necessary auxilliary files), or a GeoJSON FeatureCollection to be loaded. It's also possible to specify a single-element list consisting of the fully-qualified local file path of a ZIP file containing the source data to load, as long as it meets the following requirements: a) it's the only specified file, b) it has a '.zip' suffix, and c) it consists only of files or of exactly one directory whose contents exist only of files.
- dataCoordSys: The coordinate system that the data is in (e.g. "http://www.opengis.net/def/crs/OGC/1.3/CRS84"), or None to auto-detect.
- nominalResM: The nominal resolution of this data in metres, or None to autodetect. This helps the server know how deep to pregenerate tiles.
Returns:
A job (that can be monitored for progress) if the creation of the layer needs to be performed asynchronously, or None otherwise. Currently the former occurs when one or more file paths are specified.
Remove vector features from this layer. This can only
be done if canBeManaged and isVectors. Note that this does
not update the wgs84Extent property of the Layer object.
You will eventually need to call Layer.updateTiles() to update the map and data tiles of the layer.
Arguments:
- wgs84Extent: The WGS 84 Geographic spatial extent of the area to remove the features from (expressed as a GeoJSON Polygon or as a [minLon, minLat, maxLon, maxLat] array), or None to remove all of the features of the layer.
- relation: The spatial relation to use when comparing against the specified wgs84Extent, or None for the default (INTERSECTS)
Returns:
The number of vector features removed.
Return a list of all of the source images of this layer, regardless of what collection (if any) they're in. Only useful for coverage layers.
Arguments:
- includeGood: Whether or not to include good source images.
- includeBad: Whether or not to include bad source images.
Returns:
A list of the source images of this layer.
Add one or more source images to this layer. This can only
be done if canBeManaged and isCoverage. Source images
added in this way don't get added to a specific collection.
Also note that this does not update the wgs84Extent property of
the Layer object.
You will eventually need to call Layer.updateTiles() to incorporate these new images into the map and data tiles of the layer.
Arguments:
- filePaths: The fully-qualified local file paths to the source image(s) to be added, including any necessary auxilliary files. Alternatively, a ZIP file containing the source image(s) to be added can be specified, as long as it meets the following requirements: a) it's the only specified file, b) it has a '.zip' suffix, and c) it consists only of files or of exactly one directory whose contents exist only of files.
- hints: Hints to help the Stratos Geospatial Data Server interpret the source images, or None.
Returns:
A list of the source images that were added. Note that some of the source images may be marked as bad, and should be adjusted or removed.
Remove one or more source images from this layer, regardless
of whether or not they're in a specific collection. This can
only be done if canBeManaged and isCoverage. Also note
that this does not update the wgs84Extent property of the
Layer object.
You will eventually need to call Layer.updateTiles() to update the map and data tiles of the layer.
Arguments:
- sourceImages: The source-image objects or IDs to remove.
Return a list of all of the source-image collections of this layer.
Returns:
A list of the source-image collections of this layer.
Add an empty source-image collection to this layer. This can
only be done if canBeManaged and isCoverage. The collection
is immediately added to the Stratos Geospatial Data Server.
Arguments:
- title: A title to give the collection, or None.
- description: A brief textual description to give the collection, or None.
- referenceOnlyPath: If specified, this will be created as a
reference-only collection for the source images in the
specified local directory (beginning with a '/'), remote
HTTP directory (beginning with an 'https://') or remote
S3 directory (beginning with an 's3://'). The directory
must exist and be accessible by the server. If the
directory is a remote Amazon S3 directory, the access
keys for the S3 bucket must be present in the value of
the s3.awsKeys configuration parameter. Source images
may not be added to or removed from reference-only
collections using this API. Whenever source images are
added to or removed from the directory by some other
means (e.g., direct upload or filesystem copy), the
collection should be rescanned by calling
SourceImageCollection.rescan. - hints: A set of default hints to apply to all new source images that are added to this collection, or None.
Returns:
The new source-image collection, or a job (that can be monitored for progress) if the creation of the collection needs to be performed asynchronously. Currently the latter occurs when a referenceOnlyPath is specified, since the path will need to be scanned and that can take a while.
Remove the specified source-image collection from this layer.
This can only be done if canBeManaged and isCoverage.
WARNING: Unless it's a reference-only collection, all of the source-image files will also be removed, so be careful!
You will eventually need to call Layer.updateTiles() to update the map and data tiles of the layer.
Arguments:
- collection: A
SourceImageCollectionobject or ID.
Returns:
True if the collection was removed, or False if the collection didn't exist.
Return the style with the specified ID, or None if this layer has no such style.
Arguments:
- styleId: The ID of the style to return.
Adds a new style to this layer. This can only be done if
canBeManaged.
You will eventually need to call Layer.updateTiles() to update the map and data tiles of the layer.
Arguments:
- styleId: The ID to assign this style. An style ID cannot contain a "/" character.
- sld11UserStyleXmlStr: An SLD 1.1 UserStyle element containing
the style definition. The UserStyle
within this definition must match the specified styleId.
Remove the specified style from this layer. This can only
be done if canBeManaged.
Arguments:
- style: The
Styleobject or ID to remove.
Returns:
True if the style was removed, or False if the layer didn't have this style.
Triggers a tile update on the data and map tiles of the layer. If possible, further manipulation of the data or styles of this layer should be avoided until the tile update is complete.
Arguments:
- blocking: If False, the method will return immediately and the tile-update job will proceed concurrently. The progress of the tile update can be monitored through the returned Job object (or by monitoring the Layer.tileUpdateProgress property directly). If True, the method won't return until the tile-update job is complete (useful for scripting).
- showProgress: Whether or not to report the tile update progress to stdout. Only relevant if blocking=True.
Whether or not the specified ID is a valid ID for a layer. WARNING: This will return a string (not False) if the ID is not valid, so be sure test with "is True" or "is not True".
Arguments:
- id: The ID to test.
Returns:
True if the specified ID is a valid name for a layer, or a short string describing why it isn't.
An entry of the login history.
The date and time (in the server's time zone) of the login. (read-only)
The user account the login, either a string representing the username of a CwAuth user or an OidUser object representing an OpenID Connect user. (read-only)
A string expressed in potentially-multiple languages.
This is a dictionary that maps ISO 639-1/RFC 3066 language identifiers (e.g., "en-CA", "fr") to the string expressed in that language. The optional mapping from the empty string ("") indicates the string expressed in an unknown/default language.
An OpenID Connect user identity.
Keys:
issuer: The issuer URL of the OpenID Connect server that provides the identity. sub: the "sub" (subject) claim of the user identity at the specified OpenID Connect server, or None to refer to all user identities at the specified OpenID Connect server.
An enumeration of the operation classes that can be access controlled. Note that the EXECUTE_PROCESS and MANAGE_PROCESSES operation classes should only be specified in the access control rules for the processing server (see Stratos.getProcessingAcrs() and Stratos.setProcessingAcrs()), and the GET_RECORD, INSERT_RECORD, UPDATE_RECORD, DELETE_RECORD and HARVEST_RECORDS operation classes should only be specified in the access control rules for the catalogue server (see Catalogue.accessControlRules).
A quota. Note that quotas are not active unless the value of the audit.quotas.enable configuration parameter is set to true.
Do not instantiate directly. To get a list of quotas or a specific quota, call Stratos.getQuotas() or Stratos.getQuota() respectively. To create, update or remove a quota, call Stratos.addQuota(), Stratos.updateQuota() or Stratos.removeQuota() respectively.
The service (as known by CubeWerx Stratos Analytics) that this quota applies to (e.g., "WMS", "WMTS", "WCS", "WFS", "WPS", "CSW"), or "*" if the quota applies to all services. (read-only)
The operation (as known by CubeWerx Stratos Analytics) that this quota applies to. (e.g., "GetMap", "GetFeature"), or "*" if the quota applies to all operations. (read-only)
The granularity of this quota (i.e., what unit of time it applies to). (read-only)
The start date (inclusive, in the server's time zone) of the
current time window of this quota; this will be automatically
adjusted at the beginning of every unit of time specified by
the granularity property. (read-only)
The end date (inclusive, in the server's time zone) of the
current time window of this quota; this will be automatically
adjusted at the beginning of every unit of time specified by
the granularity property. (read-only)
The current usage (which will be automatically reset at the
beginning of every unit of time specified by the granularity
property). (read-only)
The highest warning level (typically 1 to 3, or 0 for no
warning) that the user, role maintainer or API key maintainer
has been e-mailed about regarding the current usage level; this
will be automatically reset at the beginning of every unit of
time specified by the granularity property. (read-only)
An enumeration of the things that a quota can be on.
An enumeration of granularity of a quota (i.e., what unit of time it applies to).
An enumeration of the identity types that a quota can be on.
A summary of the recent request history.
A summary of the recent request history for a specific time period.
A summary of the recent request history for this time period. (read-only)
Summaries of requests made and response bytes sent by category.
A summary of requests made and response bytes sent.
A CubeWerx Stratos CwAuth role.
Roles are a convenient way of assigning tasks to users, allowing access to be granted to particular data and/or operations based on users' roles rather than having to manage access control rules at a per-user level.
Roles can be assigned to CubeWerx Stratos CwAuth users and OpenID Connect users.
A special built-in "Administrator" role allows full administraton access to a Stratos Geospatial Data Server. This role is hardcoded-assigned to the "admin" CwAuth user, but is also assignable to other users to grant them full administraton access. This role cannot be removed.
To create a new role, create a new Role object (specifying the
desired role name), set any other desired properties, and call
Stratos.addOrReplaceRole().
To change the details of an existing role, fetch the role object via Stratos.getRoles() or Stratos.getRole(), update one or more properties of that role, and call Stratos.updateRole() to commit those changes.
To remove a role, call Stratos.removeRole().
Create a new Role object.
Arguments:
- name: The name of the role. Each role must have a unique name. Required unless supplied via the dictionary parameter.
- dictionary: A dictionary supplying properties. Do not specify; for internal use only.
The list of CubeWerx Stratos CwAuth user accounts that have
this role. These are the usernames only. To get the full
AuthUser objects (for full names and e-mail addresses, etc.),
pass this list to Stratos.getAuthUsers(). This list of users
can be re-specified with a role.authUsers = [...] assignment.
However, to add or remove a user to/from the existing list,
use Role.addAuthUser() or Role.removeAuthUser() rather than
role.authUsers.append() or role.authUsers.remove().
Add a CubeWerx Stratos CwAuth user to this role.
Arguments:
- username: The username of the CubeWerx Stratos CwAuth user account to add this role to. The specified user must exist. If the user already has this role, this is a no-op.
Remove a CubeWerx Stratos CwAuth user from this role.
Arguments:
- username: The username of the CubeWerx Stratos CwAuth user account to remove (revoke) this role from. If the user doesn't have this role, this is a no-op.
The list of OpenID Connect user identities that have this role. This list of users can be re-specified with a role.oidUsers = [...] assignment. However, to add or remove a user to/from the existing list, use Role.addOidUser() or Role.removeOidUser() rather than role.oidUsers.append() or role.oidUsers.remove().
Add an OpenID Connect user to this role.
Arguments:
- oidUser: the OpenID Connect user identity to add this role to. If the user already has this role, this is a no-op.
Remove an OpenID Connect user from this role.
Arguments:
- oidUser: The OpenID Connect user identity to remove (revoke) this role from. If the user doesn't have this role, this is a no-op.
Whether or not the specified name is a valid name for a CwAuth role. WARNING: This will return a string (not False) if the name is not valid, so be sure test with "is True" or "is not True".
Arguments:
- name: The name to test.
Returns:
True if the specified name is a valid name for a CwAuth role, or a short string describing why it isn't.
A source image (called a "scene" in the OGC API) of a coverage layer.
Do not instantiate directly. To add source images to a coverage layer, call Layer.addSourceImages() or SourceImageCollection.addSourceImages().
The ID of the SourceImageCollection that this source image is in, or Non if it'd not in a collection. (read-only)
The WGS 84 Geographic bounding box of this source image ([minLon, minLat, maxLon, maxLat]), or None. If minLon > maxLon, then the bounding box spans the antimeridian. (read-only)
The nominal resolution of this source image in metres, or None. (read-only)
If False, this source image is unuseable for the reason
provided by the errorMessage property. Consider adjusting
its hints or removing it. (read-only)
An error message describing why the source image is unuseable, or None. (read-only)
Hints to help the Stratos Geospatial Data Server interpret
this source image. If these hints are changed
programmatically, commitHintChanges must be called to commit
these changes to the Stratos Geospatial Data Server.
(read-only, but can be modified in-place)
Return a thumbnail image for this source image, or None if no thumbnail image is available for this source image.
Arguments:
- maxWidth: The preferred maximum width of the thumbnail image, or None to let the server decide.
- maxHeight: The preferred maximum height of the thumbnail image, or None to let the server decide.
Returns:
A thumbnail image for this source image, or None if no thumbnail image is available for this source image.
Commit to the Stratos Geospatial Data Server any changes that were programmatically made to the hints of this source image. Note that this may change the values of some of the properties of the source image, including its ID and whether or not it's considered a good source image.
You will eventually need to call Layer.updateTiles() to update the map and data tiles of the layer.
A source-image collection (called a "group" in the CubeWerx extensions to the OGC API) of a coverage layer.
Do not instantiate directly. To add a source-image collection to a coverage layer, call Layer.addCollection().
The title of this source-image collection, or None. Setting this (or clearing it by setting it to None) will automatically update the server.
A brief textual description of this source-image collection, or None. Setting this (or clearing it by setting it to None) will automatically update the server.
If True, this is a reference-only source-image collection.
Source images can't be added to or removed from such collections
using this API, and it's assumed that the directory specified by
the referenceOnlyPath parameter is maintained by some other
means (e.g., direct upload or filesystem copy). Whenever source
images are added to, removed from or adjusted in this directory,
the source-image collection should be rescanned by calling
rescan. (read-only)
The local directory (beginning with a '/'), remote HTTP directory (beginning with an 'https://') or remote S3 directory (beginning with an 's3://') that contains the source images of this reference-only source-image collection, or None if this isn't a reference-only source-image collection. (read-only)
A set of default hints that are applied to all new source
images that are added to this collection. If these hints are
changed programmatically, commitDefaultHintChanges must be called
to commit these changes to the Stratos Geospatial Data Server.
(read-only, but can be modified in-place)
The number of source images that are in this collection, including bad source images. (read-only)
The number of bad source images that are in this collection. Bad source images will not be rendered. A bad source image may be fixed by adjusting its hints appropriately and calling badSourceImage.commitHintChanges(). (read-only)
Return a list of all of the source images in this collection.
Arguments:
- includeGood: Whether or not to include good source images.
- includeBad: Whether or not to include bad source images.
Returns:
A list of the source images in this collection.
Add one or more source images to this collection. This can only
be done if the collection is not isReferenceOnly.
You will eventually need to call Layer.updateTiles() to incorporate these new images into the map and data tiles of the layer.
Arguments:
- filePaths: The fully-qualified local file paths to the source image(s) to be added, including any necessary auxilliary files. Alternatively, a ZIP file containing the source image(s) to be added can be specified, as long as it meets the following requirements: a) it's the only specified file, b) it has a '.zip' suffix, and c) it consists only of files or of exactly one directory whose contents exist only of files.
- hints: Hints to help the Stratos Geospatial Data Server interpret the source images, or None.
Returns:
A list of the source images that were added. Note that some of the source images may be marked as bad, and should be adjusted or removed.
Remove one or more source images from this collection. This
can only be done if the collection is not isReferenceOnly.
You will eventually need to call Layer.updateTiles() to update the map and data tiles of the layer.
Arguments:
- sourceImages: The source-image objects or IDs to remove.
Commit to the Stratos Geospatial Data Server any changes that were programmatically made to the default hints of this source-image collection.
Rescan the source images for this collection. New source images that are found will be registered, source images that no longer exist will be unregistered, and an attempt will be made to re-register any source images marked as bad. Typically only useful for reference-only collections.
The nSourceImages and nBad fields of this object will
not automatically update after a rescan. To update these
fields after a rescan, call refresh after the job completes
successfully.
Returns:
A job that can be monitored for progress.
Hints to help the Stratos Geospatial Data Server interpret a source image.
To specify hints when adding source images to a layer, create a new
SourceImageHints object, set the relevant properties, and pass this
object to Layer.addSourceImages() or
SourceImageCollection.addSourceImages().
To specify or adjust hints of an existing source image, get the
SourceImageHints object using SourceImage.hints, set or adjust
the relevant properties, and commit the changes by calling
SourceImage.commitHintChanges(). Note that this may change the
values of some of the properties of the source image, including
its ID and whether or not it's considered a good source image.
Create a new SourceImageHints object.
Arguments:
- dictionary: A dictionary supplying properties. Do not specify; for internal use only.
The color in the source images that represents the NULL color, expressed as a hexadecimal red-green-blue color value.
A second color in the source images that represents the NULL color, expressed as a hexadecimal red-green-blue color value.
An enumeration of geometry spatial-relation types.
System statistics.
The number of unique users that have used the product per specified time period, for the last specified number of time periods, in forward chronological order. For example, if the request was for nPeriods=24 and nSecondsPerPeriod=3600, then this list would contain 24 items with the last item indicating the number of unique users that have used the product within the past hour and the previous item indicating the number of unique users that have used the product during the hour before that, etc. (read-only)
The current load average of the system over the last 1, 5 and 15 minutes, respectively. For a normalized system load, divide by the number of CPUs on the system. (read-only)
An available style for a layer.
The definition of this style as an SLD 1.1 UserStyle XML element. (read-only)
Updates the definition of this style. The style is immediately
updated on the Stratos Geospatial Data Server. This can
only be done if canBeUpdated.
You will eventually need to call Layer.updateTiles() to update the map and data tiles of the layer.
Arguments:
- sld11UserStyleXmlStr: An SLD 1.1 UserStyle element containing
the new style definition. The UserStyle
within this definition must match the ID of the style.
A watermark to apply for map layer rendering.
Create a new watermark.
Arguments:
- urlOrFilePath: A URL or local file path (absolute or relative to the server URL or directory) to an image to use as the watermark, or None (but then required to be set via the property). PNG is preferred, but JPEG, GIF and TIFF will also work.
- location: Where the watermark should be applied in the rendered map, or None for the default (TILED). The only location suitable for tiled maps is TILED.
- opacity: The opacity (0...1) of the watermark (subject to the opacity of the image itself).
A URL or local file path (absolute or relative to the server URL or directory) to an image to use as the watermark, or None. PNG is preferred, but JPEG, GIF and TIFF will also work.
Where the watermark should be applied in the rendered map. The only location suitable for tiled maps is TILED.
An enumeration of where watermarks can be applied in rendered maps.
The base class for all CubeWerx-specific exceptions.
The base class for all exceptions related to logging in to a CubeWerx Stratos Geospatial Data Server.
Raised when an attempt is made to connect to a URL that doesn't appear to be a CubeWerx Stratos Geospatial Data Server.
Raised when an attempt is made to connect to a CubeWerx Stratos Geospatial Data Server whose version number is incompatible with this Python package.
Raised when the specified CubeWerx Stratos Authentication Server URL doesn't seem to point to a CubeWerx Stratos Authentication Server.
Raised when an attempt is made to connect to a CubeWerx Stratos Authentication Server whose version number is too low.
Raised when an invalid CubeWerx Stratos username or password is provided.
Raised when the provided CubeWerx Stratos username and password is accepted, but the specified user doesn't have Administrator privileges.
Raised when login attempts to the specified username are being made too frequently. Wait a few seconds and try again.
Raised when no more seats are available for the specified username. Not applicable for most servers.
A detailed error report returned by the CubeWerx Stratos Geospatial Data Server.
Raised when the CubeWerx Stratos Geospatial Data Server returns an error. Provides a detailed error report.
The HTTPError object describing the error response. (read-only)