Osm tile data collector
loaders.osm_loaders.osm_tile_data_collector ¶
This module contains classes of strategy for handling downloaded tiles.
DataCollector ¶
Bases: ABC
Store collected images.
store ¶
abstractmethod
Apply action for object storage and returns data of it.
PARAMETER | DESCRIPTION |
---|---|
idx
|
id of tile
TYPE:
|
data
|
tile
TYPE:
|
DataCollectorType ¶
Bases: str
, Enum
Define enums to choose one of known DataCollector implementations.
InMemoryDataCollector ¶
Bases: DataCollector
Store data in object memory.
Source code in srai/loaders/osm_loaders/osm_tile_data_collector.py
store ¶
Simply return object for usage.
PARAMETER | DESCRIPTION |
---|---|
idx
|
id of tile
TYPE:
|
data
|
tile
TYPE:
|
SavingDataCollector ¶
Bases: DataCollector
Save in disk collected images.
Store paths.
PARAMETER | DESCRIPTION |
---|---|
save_path
|
root path for data
TYPE:
|
file_extension
|
file name extension
TYPE:
|
Source code in srai/loaders/osm_loaders/osm_tile_data_collector.py
store ¶
Save image on disk. Returns path.
PARAMETER | DESCRIPTION |
---|---|
idx
|
id of tile
TYPE:
|
data
|
tile
TYPE:
|
Source code in srai/loaders/osm_loaders/osm_tile_data_collector.py
get_collector ¶
Return DataCollector object of type specified by DataCollectorType enum.
PARAMETER | DESCRIPTION |
---|---|
collector_type
|
If SAVE returns SavingDataCollector.
TYPE:
|
**kwargs
|
Extra arguments used for SavingDataCollector object creation arguments.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DataCollector
|
newly created object
TYPE:
|