tilezilla.stores.geotiff module¶
GeoTIFF storage method
-
class
tilezilla.stores.geotiff.
GeoTIFFStore
(path, tile, meta_options=None)[source]¶ Bases:
object
GeoTIFF tile store
A work in progress...
The GeoTIFF tile storage method separates individual acquisitions into separate sub-directories. For example:
./ ./LT50130302009294GNC01/ ./LT50130292009294GNC01/ ./LT50120292009303GNC01/ ./LT50120292009303GNC01_sr_band1.tif ./LT50120292009303GNC01_sr_band2.tif ... ./LT50120292009303GNC01_sr_cfmask.tif
Parameters: -
store_file
(product, path)[source]¶ Store a file with the product in an accessible way
An example use case for this method include storing metadata files associated with a given product (e.g., “MTL” text files for Landsat).
Note that this method swallows shutil.SameFileError that may be raised during the copy procedure. If the files are the same then the copying has, in effect, worked correctly.
Parameters: - product (BaseProduct) – A product to store
- path (str) – The path of the file to be stored
Returns: The path of the file once copied into this product’s store
Return type:
-
store_variable
(product, band, img_pattern='{tile.timeseries_id}_{band.standard_name}.tif', overwrite=False)[source]¶ Store product variable contained within this tile
Parameters: - product (BaseProduct) – A product to store
- band (Band) – A
Band
containing an observed variable - img_pattern (str) – A format string that is used for creating the
output filename for this variable using Attributes of the
product and band. GeoTIFF driver’s default is:
{product.timeseries_id}_{band.standard_name}.tif
- overwrite (bool) – Allow overwriting
Returns: The path to the stored variable
Return type:
-
meta_options
= {'tiled': True, 'compress': 'deflate', 'blockxsize': 256, 'driver': 'GTiff', 'blockysize': 256}¶ dict: GeoTIFF creation options
-