Config#

class silvimetric.resources.config.ApplicationConfig(debug: bool = (False, ), progress: bool = (False, ), dasktype: str = 'processes', scheduler: str = 'distributed', workers: int = 12, threads: int = 4, watch: bool = False, *, tdb_dir: str, log: ~silvimetric.resources.log.Log = <factory>)#

Base application config

dasktype: str = 'processes'#

Dask parallelization type. For information see https://docs.dask.org/en/stable/scheduling.html#local-threads

debug: bool = (False,)#

Debug mode, defaults to False

progress: bool = (False,)#

Should processes display progress bars, defaults to False

scheduler: str = 'distributed'#

Dask scheduler, defaults to ‘distributed’

threads: int = 4#

Number of threads per dask worker

watch: bool = False#

Open dask diagnostic page in default web browser

workers: int = 12#

Number of dask workers

class silvimetric.resources.config.Config(*, tdb_dir: str, log: ~silvimetric.resources.log.Log = <factory>, debug: bool = False)#

Base config

debug: bool = False#

Debug flag.

log: Log#

Log object.

tdb_dir: str#

Path to TileDB directory to use.

class silvimetric.resources.config.ExtractConfig(out_dir: str, attrs: list[~silvimetric.resources.attribute.Attribute] = <factory>, metrics: list[~silvimetric.resources.metric.Metric] = <factory>, bounds: ~silvimetric.resources.bounds.Bounds = None, *, tdb_dir: str, log: ~silvimetric.resources.log.Log = <factory>, debug: bool = False)#

Config for the Extract process.

attrs: list[Attribute]#

List of attributes to use in shatter. If this is not set it will be filled by the attributes in the database instance.

bounds: Bounds = None#

The bounding box of the shatter process., defaults to None

metrics: list[Metric]#

A list of metrics to use in shatter. If this is not set it will be filled by the metrics in the database instance.

out_dir: str#

The directory where derived rasters should be written.

class silvimetric.resources.config.ShatterConfig(filename: str, date: ~datetime.datetime | ~typing.Tuple[~datetime.datetime, ~datetime.datetime], attrs: list[~silvimetric.resources.attribute.Attribute] = <factory>, metrics: list[~silvimetric.resources.metric.Metric] = <factory>, bounds: ~silvimetric.resources.bounds.Bounds | None = None, name: ~uuid.UUID = UUID('15dce308-8e46-4e65-b9af-cf24012773ec'), tile_size: int | None = None, start_time: float = 0, end_time: float = 0, point_count: int = 0, mbr: tuple[tuple[tuple[int, int], tuple[int, int]], ...] = <factory>, finished: bool = False, time_slot: int = 0, *, tdb_dir: str, log: ~silvimetric.resources.log.Log = <factory>, debug: bool = False)#

Config for Shatter process

attrs: list[Attribute]#

List of attributes to use in shatter. If this is not set it will be filled by the attributes in the database instance.

bounds: Bounds | None = None#

The bounding box of the shatter process., defaults to None

date: datetime | Tuple[datetime, datetime]#

A date or date range representing data collection times.

end_time: float = 0#

The process ending time in seconds since Jan 1 1970., defaults to 0

filename: str#

Input filename referencing a PDAL pipeline or point cloud file.

finished: bool = False#

Finished flag for shatter process., defaults to False

mbr: tuple[tuple[tuple[int, int], tuple[int, int]], ...]#

The minimum bounding rectangle derived from TileDB array fragments. This will be used to for resuming shatter processes and making sure it doesn’t repeat work., defaults to tuple()

metrics: list[Metric]#

A list of metrics to use in shatter. If this is not set it will be filled by the metrics in the database instance.

name: UUID = UUID('15dce308-8e46-4e65-b9af-cf24012773ec')#

UUID representing this shatter process and will be generated if not provided., defaults to uuid.uuid()

point_count: int = 0#

The number of points that has been processed so far., defaults to 0

start_time: float = 0#

The process starting time in seconds since Jan 1 1970., defaults to 0

tile_size: int | None = None#

The number of cells to include in a tile., defaults to None

time_slot: int = 0#

The time slot that has been reserved for this shatter process. Will be used as the timestamp in tiledb writes to better organize and manage processes., defaults to 0

class silvimetric.resources.config.SilviMetricJSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)#
default(o)#

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

For example, to support arbitrary iterators, you could implement default like this:

def default(self, o):
    try:
        iterable = iter(o)
    except TypeError:
        pass
    else:
        return list(iterable)
    # Let the base class default method raise the TypeError
    return super().default(o)
class silvimetric.resources.config.StorageConfig(root: ~silvimetric.resources.bounds.Bounds, crs: ~pyproj.crs.crs.CRS, resolution: float = 30.0, attrs: list[~silvimetric.resources.attribute.Attribute] = <factory>, metrics: list[~silvimetric.resources.metric.Metric] = <factory>, version: str = '1.3.1', capacity: int = 1000000, next_time_slot: int = 1, *, tdb_dir: str, log: ~silvimetric.resources.log.Log = <factory>, debug: bool = False)#

Config for constructing a Storage object

attrs: list[Attribute]#

List of silvimetric.resources.attribute.Attribute attributes that represent point data, defaults to Z, NumberOfReturns, ReturnNumber, Intensity

capacity: int = 1000000#

TileDB Capacity, defaults to 1000000

crs: CRS#

Coordinate reference system, same for all data in a project

metrics: list[Metric]#

List of silvimetric.resources.metrics.grid_metrics grid_metrics that represent derived data, defaults to values in grid_metrics object

next_time_slot: int = 1#

Next time slot to be allocated to a shatter process. Increment after use., defaults to 1

resolution: float = 30.0#

Resolution of cells, same for all data in a project, defaults to 30.0

root: Bounds#

Root project bounding box

version: str = '1.3.1'#

Silvimetric version