Metadata-Version: 2.1
Name: tilecloud-chain
Version: 1.22.0
Summary: Tools to generate tiles from WMS or Mapnik, to S3, Berkeley DB, MBTiles, or local filesystem in WMTS layout using Amazon cloud services.
Home-page: https://github.com/camptocamp/tilecloud-chain
License: BSD-2-Clause
Keywords: gis,tilecloud,chain
Author: Camptocamp
Author-email: info@camptocamp.com
Requires-Python: >=3.10
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Pyramid
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Typing :: Typed
Requires-Dist: Jinja2
Requires-Dist: PyYAML
Requires-Dist: Shapely
Requires-Dist: azure-storage-blob
Requires-Dist: c2cwsgiutils[broadcast,debug,oauth2,standard]
Requires-Dist: certifi
Requires-Dist: jsonschema
Requires-Dist: jsonschema-validator-new
Requires-Dist: pyramid
Requires-Dist: pyramid-mako
Requires-Dist: python-dateutil
Requires-Dist: tilecloud[aws,azure,redis,wsgi]
Requires-Dist: waitress
Project-URL: Repository, https://github.com/camptocamp/tilecloud-chain
Description-Content-Type: text/markdown

# TileCloud Chain

The goal of TileCloud Chain is to provide tools around tile generation on a chain like:

Source: WMS, Mapnik.

Optionally using an SQS queue, AWS host, SNS topic.

Destination in WMTS layout, on S3, on Berkeley DB (`bsddb`), on MBTiles, or on local filesystem.

Features:

- Generate tiles.
- Drop empty tiles.
- Drop tiles outside a geometry or a bbox.
- Use MetaTiles.
- Generate the legend images.
- Generate GetCapabilities.
- Generate OpenLayers example page.
- Obtain the hash of an empty tile.
- In the future, measure tile generation speed.
- Calculate cost and generation time.
- In the future, manage the AWS hosts that generate tiles.
- Delete empty tiles.
- Copy files between caches.
- Be able to use an SQS queue to dispatch the generation.
- Post processing the generated tiles.
- ...

Legacy features:

- bsddb support
- sqlite (mbtiles) support
- mapnik support (should be updated for Python3)

## Screenshot

Screenshot of the admin page with queue stored on PostgreSQL:

![TileCloud Chain](./admin-screenshot.png)

## Get it

Create the config file `tilegeneration/config.yaml` see as [example](https://github.com/camptocamp/tilecloud-chain/blob/master/example/tilegeneration/config.yaml).

### Support

Only the latest release is supported and version &lt; 1.11 contains security issues.

## From sources

Build it:

```bash
git submodule update --recursive
python3 -m venv .build/venv
.build/venv/bin/pip install -r requirements.txt
.build/venv/bin/pip install -e .
.build/venv/bin/pip install -r dev-requirements.txt
```

## Run prospector

```bash
.build/venv/bin/prospector
```

## Run the tests

Setup your environment:

```bash
touch tilecloud_chain/OpenLayers.js
docker build --tag camptocamp/tilecloud-chain .
docker compose -p tilecloud up
```

To run the tests:

```bash
docker compose -p tilecloud exec test python setup.py nosetests --logging-filter=tilecloud,tilecloud_chain --attr '!'nopy3
```

## Documentation

As documentation you can read the [USAGE.rst](https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst)
and the [configuration reference](https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/CONFIG.md).

## VSCode

You can add that in your workspace configuration to use the JSON schema:

```json
{
  "yaml.schemas": {
    "../tilecloud-chain/tilecloud_chain/schema.json": [
      "tilecloud-chain/tilecloud_chain/tests/tilegeneration/*.yaml"
    ]
  }
}
```

## Contributing

Install the pre-commit hooks:

```bash
pip install pre-commit
pre-commit install --allow-missing-config
```

