GeoEco.Datasets.Virtual.GridSliceCollection

class GeoEco.Datasets.Virtual.GridSliceCollection(grid, tQAName='DateTime', tQADisplayName='Time', tQACoordType=None, zQAName='Depth', zQADisplayName='Depth', zQACoordType='center', displayName=None)

Bases: DatasetCollection

A DatasetCollection of Grids representing the 2D slices of a 3D or 4D Grid (or 3D slices of a 4D Grid).

Parameters:
  • grid (Grid) – Grid to split into slices. It must have a t (time) dimension or z (depth) dimension, or both.

  • tQAName (str, optional) – Name of the QueryableAttribute to define for each slice for the time t (time) dimension. Provide None if you don’t want to slice the t dimension. Ignored if grid does not have a t dimension. Minimum length꞉ 1.

  • tQADisplayName (str, optional) – DisplayName of the QueryableAttribute to define for each slice for the time t (time) dimension. Ignored if grid does not have a t dimension or tQAName is None. Minimum length꞉ 1.

  • tQACoordType (str, optional) – Type of t coordinate to use for the value of the QueryableAttribute for the t coordinate. For example, if grid has a TIncrementUnit of 'day', and the t coordinates start at midnight and are spaced 1 day apart, then if tQACoordType is 'min', the value of the QueryableAttribute will be midnight on the date of the time slice. If it is 'center' the value will be 12:00:00 on that date, and if it is 'max' it will be midnight of the next day. If None is provided, the TCornerCoordType lazy property of grid will be used for tQACoordType. Ignored if grid does not have a t dimension or tQAName is None. Allowed values꞉ 'min', 'center', 'max'.

  • zQAName (str, optional) – Name of the QueryableAttribute to define for each slice for the time z (depth) dimension. Provide None if you don’t want to slice the z dimension. Ignored if grid does not have a z dimension. Minimum length꞉ 1.

  • zQADisplayName (str, optional) – DisplayName of the QueryableAttribute to define for each slice for the time z (depth) dimension. Ignored if grid does not have a z dimension or zQAName is None. Minimum length꞉ 1.

  • zQACoordType (str, optional) – Type of z coordinate to use for the value of the QueryableAttribute for the z coordinate. For example, if increasing positive values of the z coordinate of grid indicate deeper depths and zQACoordType is 'min', the value of the QueryableAttribute will be the depth representing the shallow edge of the depth slice. If it is 'center' the value will be the center depth, and if it is 'max' it will the deep edge. Ignored if grid does not have a z dimension or zQAName is None. Allowed values꞉ 'min', 'center', 'max'.

  • displayName (str, optional) – Informal name of this object. If you do not provide a name, a suitable name will be created automatically. Minimum length꞉ 1.

Returns:

GridSliceCollection instance.

Return type:

GridSliceCollection

Properties

property CacheDirectory

(str or None) Directory for caching local copies of remote datasets. Minimum length꞉ 1. If a cache directory is not provided, then after a remote dataset is downloaded it will be kept either only in memory or in a temporary directory on disk, depending on the type of data it is. The temporary directory will be automatically deleted when Close() is called.

If a cache directory is provided, remote datasets will be stored in it when they are downloaded. Before a download is attempted, the cache directory will be checked first for the relevant dataset, and if it is found, the download will be skipped, speeding up execution.

The datasets are organized in the cache directory in an undocumented format that is specific to the collection. Once a dataset is stored in the cache directory, it is never changed or deleted. If the original remote datasets are changed, these changes will not be detected and the cache will not be updated. If the disk fills up, cached datasets will not be automatically deleted to mitigate the problem.

If you determine that the cached datasets are obsolete or the disk is too full, delete the entire cache directory. You may also be able to delete a portion of it, if you can reverse engineer how datasets are stored within it, but the organizational structure is not documented.

property DisplayName

(str) Informal name of this object, suitable to be displayed to the user. Read only. Minimum length꞉ 1.

property ParentCollection

(DatasetCollection or None) Parent DatasetCollection that this object is part of (if any). Read only.

Methods

Close

Closes any open files or connections associated with this object and releases any other resources allocated to access it.

DeleteLazyPropertyValue

Deletes the lazy property with the specified name.

GetAllQueryableAttributes

Returns a list of all queryable attributes.

GetLazyPropertyValue

Returns the value of the lazy property with the specified name.

GetNewestDataset

Queries the collection and returns the newest Dataset that matches the search expression.

GetOldestDataset

Queries the collection and returns the oldest Dataset that matches the search expression.

GetQueryableAttribute

Returns the queryable attribute with the specified name.

GetQueryableAttributeValue

Returns the value of the queryable attribute with the specified name.

GetQueryableAttributesWithDataType

Returns a list queryable attributes having the specified data type.

HasLazyPropertyValue

Returns True if the specified lazy property has a value.

ImportDatasets

Copies each Dataset in a list into this DatasetCollection.

QueryDatasets

Queries the collection and returns a list of Datasets that match a search expression.

SetLazyPropertyValue

Sets the lazy property with the specified name to the specified value.

TestCapability

Tests whether a capability is supported by this class or an instance of it.