py3dtiles.tilers.base_tiler.tiler module
- class py3dtiles.tilers.base_tiler.tiler.Tiler[source]
Bases:
ABC
,Generic
[_SharedMetadataT
,_TilerWorkerT
]Tiler abstract class, this list of attributes and methods is used by convert. This class will organize the different tasks and their order of dispatch to the TilerWorker instances.
You must set a name as class attribute and overwrite all abstract methods.
Some methods are not required, overwrite them only if needed (like validate_binary_data or memory_control)
- benchmark(benchmark_id: str, startup: float) None [source]
Prints benchmark info at the end of the conversion of this tiler and the writing of the tileset.
- abstract get_tasks(startup: float) Generator[tuple[bytes, list[bytes]], None, None] [source]
Yields tasks to be sent to workers.
This methods will get called by the main convert function each time it wants new tasks to be fed to workers. Implementors should each time returns the task that has the biggest priority.
- abstract initialization(crs_out: CRS | None, working_dir: Path, number_of_jobs: int) None [source]
The __init__ method must only set attributes without any action. It is in this method that this work must be done (and the initialization of shared_metadata).
The method will be called before all others.
- memory_control() None [source]
Method called at the end of each loop of the convert method. Checks if there is no too much memory used by the tiler and do actions in function
- name = b''
- abstract print_debug(now: float, number_of_jobs: int, number_of_idle_clients: int) None [source]
Prints info about the progression of the conversion. Called everytime a tiler worker task is finished.
- abstract print_summary() None [source]
Prints the summary of the tiler before the start of the conversion.
- abstract process_message(return_type: bytes, content: list[bytes]) bool [source]
Updates the state of the tiler in function of the return type and the returned data