Dataset

class caris.bathy.db.Dataset

Bases: caris.Dataset

Provides an interface to a Bathy DataBASE

name

str – The name of the database

current_time

datetime – The current time of the server in UTC

commit((Dataset)self) → None :

Commit any changes to the dataset

create_feature((Dataset)self, (str)feature_code, (Geometry)geometry[, (object)attributes=None]) → Feature :

Create a new feature

Parameters:
  • feature_code (str) – The type of feature to create
  • geometry (Geometry) – The geometry
  • attributes (AttributeDictionary, optional) – The attributes
Returns:

A Feature object

delete_feature((Dataset)self, (Feature)feature) → None :

Delete an existing feature

Parameters:feature (Feature) – The feature to delete
get_feature((Dataset)self, (str)id) → Feature :

Gets Feature with given id.

Parameters:id (str) – The ID of the feature.
Returns:The Feature with the given id if it exists, None if it doesn’t.
Return type:Feature
query((Dataset)self, (str)feature_code[, (object)CQL=None[, (object)contains=None[, (object)crosses=None[, (object)intersects=None[, (object)disjoint_from=None[, (object)equal_to=None[, (object)within=None[, (object)overlaps=None[, (object)touches=None]]]]]]]]]) → FeatureRange :

Query for specific features

Parameters:
  • feature_code (str) – The feature type to return
  • CQL (str) – The CQL query to run
  • contains (Geometry, optional) – The geometry contains filter
  • crosses (Geometry, optional) – The geometry crosses filter
  • intersects (Geometry, optional) – The geometry intersects filter
  • disjoint_from (Geometry, optional) – The geometry disjoint from filter
  • equal_to (Geometry, optional) – The geometry equal to filter
  • within (Geometry, optional) – The geometry within filter
  • overlaps (Geometry, optional) – The geometry overlaps filter
  • touches (Geometry, optional) – The geometry touches filter
Returns:

A FeatureRange with the features returned from the query

query_all((Dataset)self) → FeatureRange :

Query all features

Returns:Returns all Features
query_all_deleted((Dataset)self) → FeatureRange :

Query all deleted features

Returns:Returns all deleted Features
query_all_offline((Dataset)arg1) → FeatureRange :

get all offline features

Returns:The offline features (FeatureRange)
Return type:([<caris.bathy.db.Feature>])
query_deleted((Dataset)self, (str)feature_code[, (object)CQL=None[, (object)contains=None[, (object)crosses=None[, (object)intersects=None[, (object)disjoint_from=None[, (object)equal_to=None[, (object)within=None[, (object)overlaps=None[, (object)touches=None]]]]]]]]]) → FeatureRange :

Query the deleted features

Parameters:
  • feature_code (str) – The feature type to return
  • CQL (str) – The CQL query to run
  • contains (Geometry, optional) – The geometry contains filter
  • crosses (Geometry, optional) – The geometry crosses filter
  • intersects (Geometry, optional) – The geometry intersects filter
  • disjoint_from (Geometry, optional) – The geometry disjoint from filter
  • equal_to (Geometry, optional) – The geometry equal to filter
  • within (Geometry, optional) – The geometry within filter
  • overlaps (Geometry, optional) – The geometry overlaps filter
  • touches (Geometry, optional) – The geometry touches filter
Returns:

A FeatureRange with the features returned from the query

query_journal((Dataset)self, (object)operations, (Operator)operator, (object)) → object :

Query the journal

Parameters:
  • operations ([OperationType]) – The operation types to return entries for
  • operator (Operator) – The operator to apply with the provided time
  • time_utc (datetime) – The date and time to filter results on
Returns:

The list of JournalEntries satisfying the query

Return type:

([JournalEntry])

query_offline((Dataset)arg1, (str)feature_code[, (object)CQL=None[, (object)contains=None[, (object)crosses=None[, (object)intersects=None[, (object)disjoint_from=None[, (object)equal_to=None[, (object)within=None[, (object)overlaps=None[, (object)touches=None]]]]]]]]]) → FeatureRange :

Query the offline Features

Parameters:
  • feature_code (str) – The feature type to return
  • CQL (str) – The CQL query to run
  • contains (Geometry, optional) – The geometry contains filter
  • crosses (Geometry, optional) – The geometry crosses filter
  • intersects (Geometry, optional) – The geometry intersects filter
  • disjoint_from (Geometry, optional) – The geometry disjoint from filter
  • equal_to (Geometry, optional) – The geometry equal to filter
  • within (Geometry, optional) – The geometry within filter
  • overlaps (Geometry, optional) – The geometry overlaps filter
  • touches (Geometry, optional) – The geometry touches filter
Returns:

A FeatureRange with the features returned from the query

rollback((Dataset)self) → None :

Rollback any changes to the dataset

catalogue
crs
current_time
name