Package: tile-mate
tile-mateThis tool provides a tool to create continuous rasters of global publicly available tiles such as Pekel Occurence and ESA 10 m land cover. This is a simpler cousin ofdem-stitcherwithout the need for basic post-processing (e.g. fractional pixel translation and vertical datum transformations).The API can be summarized asfrom tile_mate import get_raster_from_tiles

bounds = [-120.55, 34.85, -120.25, 35.15]
X, p = get_raster_from_tiles(bounds, tile_shortname='esa_world_cover_2021')

# X is an c x m x n numpy array, where c is the number of channels specified by `count`
# p is a dictionary (or a rasterio profile) including relevant GIS metadata; CRS is epsg:4326The rasters are returned in the global lat/lon projectionepsg:4326and the API assumes that bounds are supplied in this format.import rasterio

with rasterio.open('esa_world_cover_2021_subset.tif', 'w', **p) as ds:
   ds.write(X)InstallationIn order to easily manage dependencies, we recommend using dedicated project environments
viaAnaconda/MinicondaorPython virtual environments.You can install the package withconda/mambausing:mamba install tile_mateorpip install tile-mateAlternatively, you can clone the repository and manage the environment using theenvironment.ymlfile provided.mamba env update -f environment.ymlActivate the environmentconda activate tile-mateInstall the library withpipviapip install tile-mate.For development, usepipwith-e(editable) mode:python -m pip install -e .Python 3.10+ is supported.NotebooksWe have notebooks to demonstrate common usage:Basic DemoDatasets SupportedThe datasets supported are:In [1]: from tile_mate.stitcher import DATASET_SHORTNAMES

In [2]: DATASET_SHORTNAMES
Out[2]: 'pekel_water_occ_2021',
 'esa_world_cover_2020',
 'esa_world_cover_2021',
 'hansen_annual_mosaic',
 'hansen_lossyear',
 'hansen_gain',
 'hansen_treecover_2000',
 's1_coherence_2020',
 'cop_100_lulc_discrete',
 'radd_deforestation_alerts_2022',
 'hand'These correspond toPekel:https://global-surface-water.appspot.com/downloadESA World Cover (10 m) for 2020 and 2021:https://aws.amazon.com/marketplace/pp/prodview-7oorylcamixxcHansen annual mosaic, treecover 2000, gain, and loss year:https://data.globalforestwatch.org/documents/941f17325a494ed78c4817f9bb20f33a/exploreS1 Coherence from December 2019 - Nov 2020:https://aws.amazon.com/marketplace/pp/prodview-iz6lnjbdlgcwa#resourcesThe copernicus 100 m LULC dataset from 2015 - 2019:https://land.copernicus.eu/global/content/annual-100m-global-land-cover-maps-availableHeight above nearest drainage (distributed and generated by ASF) in 2021:https://github.com/asjohnston-asf/agu-2022-notebooks/blob/main/hand-notebook.ipynb(and theirtoolto do the exact same thing)See thesenotebooksto see how these tiles are generated and organized.Dateline supportNone curently.ContributingWe welcome contributions to this open-source package. To do so:Create an GitHub issue ticket desrcribing what changes you need (e.g. issue-1)Fork this repoMake your modifications in your own forkMake a pull-request (PR) in this repo with the code in your fork and tag the repo owner or a relevant contributor.We useflake8and associated linting packages to ensure some basic code quality (see theenvironment.yml). These will be checked for each commit in a PR. Try to write tests wherever possible.SupportCreate an GitHub issue ticket desrcribing what changes you would like to see or to report a bug.We will work on solving this issue (hopefully with you).AcknowledgementsThis tool was developed to supportOPERA.