geosoft.gxpy.geometry submodule¶
Spatial geometric elements.
Classes: |
|
---|
Note
Regression tests provide usage examples: geometry tests
-
class
geosoft.gxpy.geometry.
Geometry
(**kwargs)¶ Bases:
object
Geometry base class for all geometries.
Parameters: coordinate_system – geosoft.gxpy.Coordinate_system
instance.New in version 9.2.
-
coordinate_system
¶ geosoft.gxpy.Coordinate_system
instance. Can be set.
-
-
exception
geosoft.gxpy.geometry.
GeometryException
¶ Bases:
Exception
Exceptions from
geosoft.gxpy.geometry
.
-
class
geosoft.gxpy.geometry.
PPoint
(xyz, z=0.0, **kwargs)¶ Bases:
geosoft.gxpy.geometry.Geometry
,collections.abc.Sequence
Poly-Point class. Basic instance arithmetic and equality testing is supported.
Parameters: - xyz – array-like, either ((x, y), ...), ((x, y, z), ...) or (vv_x, vv_y, [vv_z]). vv data is resampled to match the first vv.
- z – constant z value for (x, y) data, ignored for (x, y, z) data
Properties: pp: np_array shape (n,3) x, y, z: np_arrays of each ordinate set xy: np_arrays of (x,y) points (n,2) xyz: same as pp New in version 9.2.
-
classmethod
from_list
(xyzlist, z=0.0)¶
-
length
¶ number of points
-
make_xyz_vv
()¶ Return x, y and z as a set of
geosoft.gxpy.vv.GXvv
.Returns: (xvv, yvv, zvv) New in version 9.2.
-
x
¶ x array slice, can be set
-
xy
¶ (x,y) array slice, can be set
-
xyz
¶ xyz point array
-
y
¶ y array slice, can be set
-
z
¶ z array slice, can be set
-
class
geosoft.gxpy.geometry.
Point
(p, **kwargs)¶ Bases:
geosoft.gxpy.geometry.Geometry
Spatial location (x,y,z). Basic instance arithmetic and equality testing is supported.
Parameters: p –
point in one of the following forms:
Point makes a copy (x, y [,z]) implied z is 0.0 if not provided k makes a point (k, k, k)
Properties: x, y, z: point ordinate values xy: (x, y) tuple xyz: (x, y, z) tuple New in version 9.2.
-
x
¶ x value, can be set
-
xy
¶ (x, y), can be set
-
xyz
¶ (x, y, z), can be set
-
y
¶ y value, can be set
-
z
¶ z value, can be set
-
-
class
geosoft.gxpy.geometry.
Point2
(p, **kwargs)¶ Bases:
geosoft.gxpy.geometry.Geometry
Two points, for a line, or a rectangle, or a cube. Basic instance arithmetic and equality testing is supported.
Parameters: p –
Points in one of the following forms:
(Point, Point) ((x, y [,z]), (x, y [,z])) implied z is 0 if not specified (x0, y0, x1, y1) implied z is 0 (x0, y0, z0, x1, y1, z1)
Properties: p0: first point as a Point
instancep1: second point at a Point
instancex2, y2, z2: tuple pairs for (x0, x1), (y0, y1), (z0, z1) centroid: center of the two points dimension: (dx, dy, dz) dimension defines by teo points. New in version 9.2.
-
dimension
¶ dimensions as (dx, dy, dz)
-
x2
¶ (x0, x1), can be set
-
y2
¶ (y0, y1), can be set
-
z2
¶ (z0, z1), can be set
-