PMTiles User Guide¶
Welcome to the Tileverse PMTiles User Guide. This guide will help you understand and use the PMTiles library effectively.
What You'll Learn¶
This guide covers:
- Quick Start: Get up and running quickly
- Reading PMTiles: Read tiles from PMTiles archives
- Writing PMTiles: Create new PMTiles archives
- Cloud Storage: Work with PMTiles in S3, Azure, and GCS
Prerequisites¶
Before you begin, make sure you have:
- Java 17 or newer installed
- Basic familiarity with Maven or Gradle
- Understanding of tile-based mapping concepts
Installation¶
Add the PMTiles dependency to your project:
<dependency>
<groupId>io.tileverse.pmtiles</groupId>
<artifactId>tileverse-pmtiles</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<!-- Also add a Range Reader provider -->
<dependency>
<groupId>io.tileverse.rangereader</groupId>
<artifactId>tileverse-rangereader-all</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
Core Concepts¶
PMTiles Structure¶
A PMTiles archive contains:
- Header: Metadata about the tileset (bounds, zoom levels, tile format)
- Directory: Spatial index using Hilbert curves
- Tiles: Compressed tile data
Tile Addressing¶
Tiles are addressed using the standard XYZ scheme:
- z: Zoom level (0 = world view, higher = more detailed)
- x: Column number (west to east)
- y: Row number (north to south in TMS, south to north in XYZ)
Data Sources¶
PMTiles can be read from any source supported by Range Reader:
- Local files
- HTTP/HTTPS servers
- Amazon S3
- Azure Blob Storage
- Google Cloud Storage
Next Steps¶
- Quick Start: Begin with a simple example
- Reading PMTiles: Learn about reading tiles
- Cloud Storage: Access PMTiles from the cloud