Data#
- class silvimetric.resources.data.Data(filename: str, storageconfig: StorageConfig, bounds: Bounds = None)#
Bases:
object
Represents a point cloud or PDAL pipeline, and performs essential operations necessary to understand and execute a Shatter process.
- property array: ndarray#
Fetch the array from the execute()’d pipeline
- Returns:
get data as a numpy ndarray
- bounds#
Bounds of this section of data
- count(bounds: Bounds) int #
For the provided bounds, read and count the number of points that are inside them for this instance.
- Parameters:
bounds – query bounding box
- Returns:
point count
- estimate_count(bounds: Bounds) int #
For the provided bounds, estimate the maximum number of points that could be inside them for this instance.
- Parameters:
bounds – query bounding box
- Returns:
estimated point count
- execute()#
Execute PDAL pipeline
- Raises:
Exception – PDAL error message passed from execution
- filename#
Path to either PDAL pipeline or point cloud file
- get_array() ndarray #
Fetch the array from the execute()’d pipeline
- Returns:
get data as a numpy ndarray
- static get_bounds(reader: Reader) Bounds #
Get the bounding box of a point cloud from PDAL.
- Parameters:
reader – PDAL Reader representing input data
- Returns:
bounding box of point cloud
- get_pipeline() Pipeline #
Fetch the pipeline for the instance
- Raises:
Exception – File type isn’t COPC or EPT
Exception – More than one reader detected
- Returns:
Return PDAL pipline
- get_reader() Reader #
Grab or make the reader for this instance so we can use it to do things like get the count()
- Returns:
get PDAL reader for input
- is_pipeline() bool #
Does this instance represent a pdal.Pipeline or a simple filename
- Returns:
Return true if input is a pipeline
- make_pipeline() Pipeline #
Take a COPC or EPT endpoint and generate a PDAL pipeline for it
- Returns:
Return PDAL pipeline
- pipeline#
PDAL pipeline
- reader#
PDAL reader
- reader_thread_count#
Thread count for PDAL reader. Keep to 2 so we don’t hog threads
- storageconfig#
silvimetric.resources.StorageConfig
- to_json()#