py3dtiles.tilers.base_tiler.tiler_worker module#
- class py3dtiles.tilers.base_tiler.tiler_worker.TilerWorker(shared_metadata: _SharedMetadataT)[source]#
Bases:
ABC
,Generic
[_SharedMetadataT
]- abstract execute(command: bytes, content: list[bytes]) Iterator[Sequence[bytes]] [source]#
Executes a command sent by the tiler. Each sequence of bytes returned by the returned Iterator will be sent back to the corresponding tiler.
The easiest way to do so is to
yield
the Sequence to be sent. This will automatically turn the method into a generator, which is incidentally an Iterator. This has the good additional side-effect of passing back control to the calling method, which will in turn send the message immediately, without waiting for this method to be executed.Implementing classes can use any message format they like provided it is a Sequence of bytes. The only restriction is that the first element of the sequence should not be a value in the
py3dtiles.tilers.base_tiler.message_type.WorkerMessageType
enum, as those are used internally by the convert process to manage the lifecycles of the different entities.