
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
This library provides a tool to create continuous rasters of publicly available, global tile sets (in lat/lon) such as Pekel Occurence and ESA 10 m land cover. This is a simpler cousin of dem-stitcher
without the need for basic post-processing (e.g. fractional pixel translation and vertical datum transformations).
The API can be summarized as
from 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 rasterio `count` metadata
# p is a dictionary (or a rasterio profile) including relevant GIS metadata; CRS is assumed to be epsg:4326
The rasters are returned in the global lat/lon projection epsg:4326
and 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)
In order to easily manage dependencies, we recommend using dedicated project environments via Anaconda/Miniconda or Python virtual environments.
You can install the package with conda
/mamba
using:
mamba install tile_mate
or
pip install tile-mate
Alternatively, you can clone the repository and manage the environment using the environment.yml
file provided.
mamba env update -f environment.yml
conda activate tile-mate
pip
via pip install tile-mate
.For development, use pip
with -e
(editable) mode:
python -m pip install -e .
Python 3.9+ is supported.
We have notebooks to demonstrate common usage:
There are numerous tile sets. There are keyword arguments for many of the tiles. For example, for hansen_annual_mosaic
the years 2013-2022 can be specified. The easiest way to see what is possible is to look at the Basic Demo. The 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',
'glad_landcover',
'glad_change'
More information about these datasets can be found below
rho
, tau
and rmse
seasonal decay modeling parametersSee these notebooks to see how these tiles are generated and organized. Feel free to open a issue ticket or PR if there are modifications or new tilesets you would like to see.
None curently.
We welcome contributions to this open-source package. To do so:
We use flake8
and associated linting packages to ensure some basic code quality (see the environment.yml
). These will be checked for each commit in a PR. Try to write tests wherever possible.
This tool was developed to support OPERA.
FAQs
Create rasters from global tiles
We found that tile-mate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.