versatiles_image

A toolbox for converting, checking and serving map tiles in various formats

9 releases

0.12.8 Sep 30, 2024
0.12.7 Sep 30, 2024
0.12.5 Aug 7, 2024
0.12.4 Jul 22, 2024

#128 in Geospatial

Download history 175/week @ 2024-07-01 234/week @ 2024-07-08 24/week @ 2024-07-15 114/week @ 2024-07-22 30/week @ 2024-07-29 156/week @ 2024-08-05 22/week @ 2024-08-12 13/week @ 2024-08-19 23/week @ 2024-08-26 2/week @ 2024-09-02 3/week @ 2024-09-09 189/week @ 2024-09-16 55/week @ 2024-09-23 362/week @ 2024-09-30

609 downloads per month
Used in 6 crates (2 directly)

MIT license

255KB
6.5K SLoC

Crates.io Crates.io Code Coverage GitHub Workflow Status (with event) License Matrix Chat

VersaTiles

VersaTiles is a Rust-based project designed for processing and serving tile data efficiently. It supports multiple tile formats and offers various functionalities for handling tile data.

Installation

Linux

Use the installation script to download the correct precompiled binary and copy it to /usr/local/bin/:

curl -Ls "https://github.com/versatiles-org/versatiles-rs/raw/main/helpers/install-linux.sh" | bash

MacOS

Install VersaTiles using Homebrew:

brew tap versatiles-org/versatiles
brew install versatiles

Docker

Pull the prepared Docker Images for easy deployment:

docker pull versatiles-org/versatiles

Building from Source

To build VersaTiles from source, ensure you have Rust installed. Then, run:

cargo install versatiles

Usage

Running the versatiles command will list all available commands:

Usage: versatiles [OPTIONS] <COMMAND>

Commands:
  convert  Convert between different tile containers
  probe    Show information about a tile container
  serve    Serve tiles via http
  help     Show detailed help

Examples

Convert Tiles

Convert between different tile formats:

versatiles convert --tile-format webp satellite_tiles.tar satellite_tiles.versatiles

Serve Tiles

Serve tiles via HTTP:

versatiles serve satellite_tiles.versatiles

Repository Structure

Code

  • /versatiles/ - Main library and binary.
  • /versatiles_container/ - Reading and writing tile containers like *.versatiles, *.mbtiles, *.pmtiles, etc.
  • /versatiles_core/ - Core data types, utilities, and macros.
  • /versatiles_derive/ - Handles derive macros.
  • /versatiles_geometry/ - Manages geometry data, including OSM data, GeoJSON, vector tiles, etc.
  • /versatiles_image/ - Handles image data (PNG, JPEG, WEBP) and image processing.
  • /versatiles_pipeline/ - Manages "VersaTiles Pipelines" for fast tile processing.

Helpers

  • /docker/ - Contains a Dockerfile for building Linux binaries.
  • /helpers/ - Shell scripts for checking, building, and releasing.
  • /testdata/ - Files used during testing.

Additional Information

For more details, guides, and advanced usage, please refer to the official documentation.

Development and Contribution

VersaTiles is under active development, and the documentation may not always be up to date. We appreciate your understanding and patience. If you encounter any issues or have questions, feel free to open an issue or contribute to our code or documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Dependencies

~26–39MB
~709K SLoC