vyperdatum.drivers.pdal_based

Attributes

logger

fname

Classes

PDAL

Helper class that provides a standard way to create an ABC using

Module Contents

vyperdatum.drivers.pdal_based.logger
class vyperdatum.drivers.pdal_based.PDAL(input_file: str, output_file: str, invalid_error: bool = True)

Bases: vyperdatum.drivers.base.Driver

Helper class that provides a standard way to create an ABC using inheritance.

input_file
output_file
info(fname: str, args: list[str] | None = None) tuple[dict | None, str | None]

Spawn a new process to run pdal info and capture its output.

Parameters:
  • fname (str) – Path to the input file.

  • args (Optional[list[str]]) – Optional pdal info arguments.

Returns:

stdout – standard output and error.

Return type:

Optional[dict], std_err: Optional[str]

exec_pipeline(pipe_string: str)

Execute a general pdal pipeline.

Parameters:

pipe_string (str) – PDAL’s pipeline json object in string format.

fetch_entwine(bounds: list[float] | None, resolution: int | None, output_format: str = 'writers.las') bool

Download a subset of Etwine resource defined by bounds: [x_min, x_max, y_min, y_max]. The subset data is converted into the output_format which is a PDAL type.

Parameters:
  • bounds (Optional[list[float]]) – Bounding box that delimits the remote Etwine resource to be downloaded. It should be a list of float values in this order: [x_min, x_max, y_min, y_max].

  • output_format (str, default 'writers.las') – PDAL writers type; defaults to ‘writers.las’. See more https://pdal.io/en/2.8.1/stages/writers.html.

Returns:

True if download succeed, otherwise False.

Return type:

bool

wkt(fname: str) str

Return the WKT associated with the input file fname.

Parameters:

fname (str) – Path to the input file.

Raises:

ValueError – When pdal info –metadata <fname> fails.

Return type:

str

property is_valid
transform(transformer_instance, vdatum_check: bool) None

Create a PDAL pipeline to apply CRS transformation on the input data according to the transformer_instance.

Parameters:

transformer_instance (vyperdatum.transformer.Transform) – Instance of the transformer class.

Return type:

None

vyperdatum.drivers.pdal_based.fname = 'C:\\Users\\mohammad.ashkezari\\Documents\\projects\\vyperdatum\\untrack\\data\\point\\laz\\ma202...