parq_blockmodel.geometry.Geometry
- class parq_blockmodel.geometry.Geometry[source]
Base class for geometry objects.
The geometry associated with omf block models are not defined by block centroids, and vary by block model type. In the pandas representation, the geometry is defined by the block centroids, so this class is used to define the geometry in terms of block centroids. Additionally, other properties of the geometry are defined here, such as the shape of the geometry.
Attributes (in omf and pyvista) are stored in Fortran ‘F’ order, meaning that the last index changes the fastest. Hence, the MultiIndex levels need to be sorted by ‘z’, ‘y’, ‘x’, to align with the Fortran order. This has x changing fastest, z changing slowest.
- __init__()
Methods
__init__
()from_multi_index
(index)nearest_centroid_lookup
(x, y, z)to_json_file
(json_filepath)Write the Geometry to a JSON file.
to_multi_index
()Convert the geometry to a JSON string.
Attributes
axis_u
axis_v
axis_w
bounding_box
Return the unique u coordinates of the centroids.
Return the unique v coordinates of the centroids.
Return the unique w coordinates of the centroids.
Return the x coordinates of the centroids.
Return the y coordinates of the centroids.
Return the z coordinates of the centroids.
extents
is_regular
Check if the geometry is rotated.
num_blocks
shape
srs
summary
corner
- abstract property centroid_u: ndarray[Any, dtype[floating]]
Return the unique u coordinates of the centroids.
- abstract property centroid_v: ndarray[Any, dtype[floating]]
Return the unique v coordinates of the centroids.
- abstract property centroid_w: ndarray[Any, dtype[floating]]
Return the unique w coordinates of the centroids.
- abstract property centroid_x: ndarray[Any, dtype[floating]]
Return the x coordinates of the centroids.
- abstract property centroid_y: ndarray[Any, dtype[floating]]
Return the y coordinates of the centroids.
- abstract property centroid_z: ndarray[Any, dtype[floating]]
Return the z coordinates of the centroids.
- property is_rotated: bool
Check if the geometry is rotated.