Configuration¶
Tile Specification¶
A tile specification describes the positioning, grid layout, and coordinate reference system that ingested imagery will be reprojected, diced, and aligned to match with.
A tile specification is described by four attributes:
crs
(str
): The coordinate reference system, given as a Proj4 string or Well-Known-Text.ul
(tuple
): The upper left X and Y coordinates of the tile specificationres
(tuple
): The pixel resolution of data in the tile specificationsize
(tuple
): The number of pixels (columns and rows) in each tile. The total area covered by a tile is a function of the pixel size and the number of pixels per tile.
Tilezilla includes a few “well known specifications” that include:
- WELD_CONUS
crs
: “EPSG:5070”ul
: [-2565600.0, 3314800.0]res
: [30, 30]size
: [5000, 5000]
Database¶
Tilezilla’s database backend is written using SQLAlchemy ORM to abstract as much as possible away from the type of database used. Currently, only SQLite has been tested but the structure should be in place to switch to something more complex (e.g., PostgreSQL).
SQLite¶
Todo
Describe SQLite configuration
Storage¶
Tiled data are stored on disk either as a collection of GeoTIFF images or NetCDF4 files.
Currently, only the GeoTIFF storage format is implemented.
GeoTIFF¶
Todo
Document the GeoTIFF storage format
Products¶
Todo
Write about existing products (ESPALandsat) and how one can write YAML file to describe arbitrary products for ingest
Example¶
The following example configuration file describes the configuration needed to ingest Landsat data processed to surface reflectance through the ESPA system into a tiling scheme that has the same parameters as the Web Enabled Landsat Data (WELD) tiled data product.
The include_filter
option in the products
section
limits the ingest to only include surface reflectance, brightness temperature,
and CFmask bands. Any reprojection necessary for this ingest will be done using
nearest neighbor resampling.
# Metadata
version: 0.1.0
# Database
# See connection information at:
# http://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.engine.url.URL
database:
drivername: sqlite
database: /home/ceholden/tiles/tilezilla.db
# Not required, but used with postgresql, etc.
# username:
# password:
# host:
# port:
debug: False
# Tile storage method
store:
## Required
name: GeoTIFF # could be NetCDF
root: /home/ceholden/tiles
tile_dirpattern: 'h{horizontal:04d}v{vertical:04d}'
tile_imgpattern: '{product.timeseries_id}_{band.standard_name}.tif'
## Additional option -- specific (?) to GeoTIFF: creation options
co:
tiled: true
blockxsize: 256
blockysize: 256
compress: deflate
# Tile specification
## For recognized systems
tilespec: WELD_CONUS
## Or manually
# tilespec:
# # Coordinate reference system
# crs: EPSG:5070
# # Upper left x/y coordinate
# ul: 15, 15
# # Resolution (x/y) of each pixel
# res: 30, 30
# # Number of pixels (x/y) in each tile
# size: 500, 500
# Products
products:
## Product handling options, specified by product type
ESPALandsat:
include_filter:
regex: false
# Attributes of each product band to include
long_name:
- '*surface reflectance*'
- '*brightness temperature*'
- '*cfmask_band*'
resampling: nearest