geosoft.gxpy.spatialdata submodule¶
Geosoft spatial data base class.
Spatial datasets are collections of geometric objects that have associated data, typically persisting in a named file. Examples are Geosoft databases, grids, voxels, geosoft_surfaces.
Classes: |
|
---|
Constants
mode=
file open mode constants
FILE_READ 0 open for read, files are not changed FILE_READWRITE 1 open for read and write, files can be changed FILE_NEW 2 new file, accompanied by overwrite=
parameter
-
class
SpatialData
(name=None, file_name=None, mode=2, overwrite=False, **kwargs)¶ Bases:
geosoft.gxpy.geometry.Geometry
Base class for spatial datasets.
Parameters: - name – dataset name.
- file_name – file name for this dataset.
- mode – file mode, MODE_READ, MODE_READWRITE or MODE_NEW. The default is MODE_NEW.
- overwrite – Default is False. If True will raise an error if MODE_NEW and file_name exists.
- gxobj – Base GXAPI spatial dataset object, default is None. If passed the base object is used to resolve common named methods like `get_ipj()`.
Properties: properties of
geosoft.gxpy.geometry.Geometry
plus:file_name
file name metadata
metadata dictionary unit_of_measure
primary data unit of measurement New in version 9.3.1.
-
close
()¶ close the dataset.
-
dataset_mode
¶ Dataset open mode
-
file_name
¶ dataset primary file name
-
metadata
¶ Return the dataset metadata as a dictionary. Can be set, in which case the dictionary items passed will be added to, or replace existing metadata.
See also
Geosoft metadata
Schema
New in version 9.3.1.
-
unit_of_measure
¶ Units of measurement (a string) for the primary scalar data associated with this dataset.
Can be set.
New in version 9.3.1.
-
exception
SpatialException
(message)¶ Bases:
geosoft.GXRuntimeError
Exceptions from
geosoft.gxpy.spatial_data
.
-
coordinate_system_from_metadata
(meta)¶ Return a
geosoft.gxpy.coordinate_system.Coordinate_system
instance from metadata.Parameters: meta – metadata dictionary Returns: geosoft.gxpy.coordinate_system.Coordinate_system
, or None
-
coordinate_system_from_metadata_file
(file_name)¶ Return a
geosoft.gxpy.coordinate_system.Coordinate_system
instance from metadata.Parameters: file_name – spatial dataset name. Returns: geosoft.gxpy.coordinate_system.Coordinate_system
, or None
-
delete_files
(file_name)¶ Delete file and xml file
Parameters: file_name – base file name New in version 9.3.1.
-
extent_from_metadata
(meta)¶ Return spatial dataset extent from geosoft metadata.
Parameters: meta – metadata dictionary Returns: geosoft.gxpy.geometry.Point2
instanceNew in version 9.3.1.
-
extent_from_metadata_file
(file_name)¶ Return spatial dataset extent from file metadata .xml file
Parameters: file_name – spatial dataset file Returns: geosoft.gxpy.geometry.Point2
instanceNew in version 9.3.1.
-
find_meta_branch
(meta, item)¶ Return the lowest branch in the meta dictionary that contains the item.
New in version 9.3.1.