Point/Line Sets¶
Add Cell Connectivity to Points¶

class
PVGeo.filters.xyz.
AddCellConnToPoints
(**kwargs)[source]¶ Bases:
PVGeo.base.FilterBase
This filter will add linear cell connectivity between scattered points. You have the option to add
VTK_Line
orVTK_PolyLine
connectivity.VTK_Line
connectivity makes a straight line between the points in order (either in the order by index or using a nearest neighbor calculation). TheVTK_PolyLine
adds a poly line connectivity between all points as one spline (either in the order by index or using a nearest neighbor calculation). Type map is specified in vtkCellType.h.Cell Connectivity Types:
4: Poly Line
3: Line
Build Surface From Points¶

class
PVGeo.filters.xyz.
BuildSurfaceFromPoints
(**kwargs)[source]¶ Bases:
PVGeo.base.FilterBase
From the sorted x, y, and z station locations in the input PolyData, create a surface to project down from the line of those points. Use the Z cells to control the size of the mesh surface

static
create_surface
(points, z_range)[source]¶ From the sorted x, y, and z station locations, create a surface to display a seismic recording/migration on in space. The result is defined in the X,Y,Zz_range 3D space.
The z_range should be treated as relative coordinates to the values given on the third column of the points array. If you want the values in the z_range to be treated as the absolute coordinates, simply do not pass any Z values in the points array  if points is N by 2, then the values in z_range will be inferred as absolute.
 Parameters
points (np.ndarray) – arraylike of the station x and y locations
by 23) z_range ((npts) – The linear space of the z
This will be filled out for every station location. (dimension.) –
 Returns
pyvista.UnstructuredGrid

static
Convert XYZ Units¶

class
PVGeo.filters.xyz.
ConvertUnits
(conversion='meter_to_feet', **kwargs)[source]¶ Bases:
PVGeo.base.FilterPreserveTypeBase
Convert points in an input data object to from meters to feet or vice versa. This simply uses a
vtkTransformFilter
and scales input data object with common conversions.
Extract Cell Centers¶

class
PVGeo.filters.xyz.
ExtractCellCenters
(**kwargs)[source]¶ Bases:
PVGeo.base.FilterBase
Extract Points¶

class
PVGeo.filters.xyz.
ExtractPoints
[source]¶ Bases:
PVGeo.base.FilterBase
Extracts XYZ coordinates and point/cell data from an input
vtkDataSet
Iterate Over Points¶

class
PVGeo.filters.xyz.
IterateOverPoints
(dt=1.0)[source]¶ Bases:
PVGeo.base.FilterBase
Iterate over points in a time varying manner.
Lat Lon To UTM¶

class
PVGeo.filters.xyz.
LonLatToUTM
(**kwargs)[source]¶ Bases:
PVGeo.base.FilterPreserveTypeBase
Converts Points from Lon Lat to UTM

__convert_2d
(lon, lat, elev)¶ Converts 2D Lon Lat coords to 2D XY UTM points

Points to Tube¶

class
PVGeo.filters.xyz.
PointsToTube
(num_sides=20, radius=10.0, capping=False, **kwargs)[source]¶ Bases:
PVGeo.filters.xyz.AddCellConnToPoints
Takes points from a vtkPolyData object and constructs a line of those points then builds a polygonal tube around that line with some specified radius and number of sides.
Rotate Points¶

class
PVGeo.filters.xyz.
RotatePoints
(angle=45.0, origin=None, use_corner=True)[source]¶ Bases:
PVGeo.base.FilterBase
Rotates XYZ coordinates in vtkPolyData around an origin at a given angle on the XY plane.
Rotation Tool¶

class
PVGeo.filters.xyz.
RotationTool
(decimals=6)[source]¶ Bases:
object
A class that holds a set of methods/tools for performing and estimating coordinate rotations.

static
_get_rotation_matrix
(theta)[source]¶ Internal helper to generate a rotation matrix given a rotation angle

estimate_and_rotate
(x, y, z)[source]¶ A method to estimate the rotation of a set of points and correct that rotation on the XY plane

static
rotate_around
(pts, theta, origin)[source]¶ Rotate points around an origins given an anlge on the XY plane

static
rotation_matrix
(vector_orig, vector_fin)[source]¶ Calculate the rotation matrix required to rotate from one vector to another. For the rotation of one vector to another, there are an infinit series of rotation matrices possible. Due to axially symmetry, the rotation axis can be any vector lying in the symmetry plane between the two vectors. Hence the axisangle convention will be used to construct the matrix with the rotation axis defined as the cross product of the two vectors. The rotation angle is the arccosine of the dot product of the two unit vectors. Given a unit vector parallel to the rotation axis, w = [x, y, z] and the rotation angle a, the rotation matrix R is:
 1 + (1cos(a))*(x*x1) z*sin(a)+(1cos(a))*x*y y*sin(a)+(1cos(a))*x*z  R =  z*sin(a)+(1cos(a))*x*y 1 + (1cos(a))*(y*y1) x*sin(a)+(1cos(a))*y*z   y*sin(a)+(1cos(a))*x*z x*sin(a)+(1cos(a))*y*z 1 + (1cos(a))*(z*z1) 
 Parameters
vector_orig (umpy array, len 3) – The unrotated vector defined in the reference frame.
vector_fin (numpy array, len 3) – The rotated vector defined in the reference frame.
Note
This code was adopted from printipi under the MIT license.

static