Skip to main content

Creating Tiles

Overture is primarily distributed in the GeoParquet format. While GeoParquet is a compact format, tiles are essential for creating pannable, zoomable slippy maps for display on the web.

  • Data is broken into equal-sized square chunks (tiles), to load only the visible data.
  • Tiles are arranged in a pyramid by level of detail, enabling zoomed-out overviews.

overture-tiles on GitHub

The overture-tiles GitHub repository contains scripts and programs to generate tilesets from Overture data. These tilesets are designed for an "X-ray" visualization like at explore.overturemaps.org to aid in inspecting geometry and properties. They are not designed to be a production-ready cartographic basemap.

explore.overturemaps.org

Each Overture theme is stored as a separate PMTiles archive.

The individual tiles contain geometry and tags in the open MVT vector tile format.

Accessing Tiles

Overture Tiles are generated with each release. The current beta distribution of tiles are at this url:

s3://overturemaps-tiles-us-west-2-beta/RELEASE/THEME.pmtiles

These public S3 URLs can also be accessed via HTTP:

https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/RELEASE/THEME.pmtiles

Viewing Tiles

Local and remote HTTP URLs can be previewed at pmtiles.io.

View 2024-07-22/places.pmtiles on pmtiles.io

Area Extracts

To create a new tileset for only part of the world, use the extract command of the pmtiles CLI.

To get all buildings tiles around Ghent, Belgium:

pmtiles extract https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/2024-07-22/buildings.pmtiles ghent.pmtiles --bbox=3.660507,51.004250,3.784790,51.065996

On AWS

The overture-tiles scripts can be automated with AWS Batch, which generates the largest global tilesets in ~90 minutes using c7gd.16xlarge Ec2 instances on demand. Costs incurred include on-demand instances and S3 storage + transaction costs.

Prerequisites

Setup

  1. Modify bin/overture-tiles-cdk.ts, specifying a different S3 bucket name.

  2. From the overture-tiles-cdk repository:

npm run cdk bootstrap
npm run cdk deploy
  1. Authenticate your Docker client with the provisioned AWS Elastic Container Registry (ECR) in the web console. Use View Push Commands to build the Dockerfile in the overture-tiles repository and push to ECR:

explore.overturemaps.org

  1. Submit jobs from the AWS Batch console.

explore.overturemaps.org

  • Select from the available Job Definitions. Each Definition is associated with a version and theme from an Overture release.

  • Select the OvertureTilesQueue as the Job queue.

  • Once the job is complete, the tileset will be available at s3://BUCKET_NAME/RELEASE/THEME.pmtiles.

On Your Workstation

Requirements

Scripts

  • Copy the Overture Parquet dataset to your local machine using these docs. If you want to only run on a small sample of data, you can use only the first .parquet file instead of all in the directory.

  • for the base, buildings and transportation themes, generate the tileset with java:

# --data indicates where your Overture data is (overture/theme=base/...)
java -cp planetiler.jar profiles/Base.java --data=overture

The above command outputs base.pmtiles in the data dir.

  • for other themes, run the theme script in themes/:
scripts/2024-07-22/places.sh overture places.pmtiles

This reads from Overture data in overture and writes places.pmtiles.

Customization

The tilesets accompanying Overture releases are primarily for powering explore.overturemaps.org. For your own application, you may want to:

  • Limit or modify the properties of each feature, to reduce the tile sizes.
  • Change what features or properties are included at generalized lower zoom levels.

In these examples we'll work with a small area extract of Boston in the boston/ folder, but all tiling methods can scale to the full dataset.

mkdir -p boston/theme=buildings/type=building
mkdir -p boston/theme=places/type=place
overturemaps download --bbox=-71.068,42.353,-71.058,42.363 -f geoparquet --type=building -o boston/theme=buildings/type=building/0.geoparquet
overturemaps download --bbox=-71.068,42.353,-71.058,42.363 -f geoparquet --type=place -o boston/theme=places/type=place/0.geoparquet

Example: Places

The default places.sh script includes all Overture properties to aid inspection. To slim down the tile sizes, you can remove all the primary name in the @name field.

Modify places.sh for the release matching your Overture data:

  ...
json_object(
'id', id,
'@name', json_extract_string(names, '$.primary')
) AS properties,
...
./scripts/2024-07-22/places.sh boston boston_places.pmtiles

Inspect the created boston_places.pmtiles on pmtiles.io to see the slimmed-down properties:

customized places tileset

Example: Buildings

To reduce the size of tiles, the default Buildings script includes all properties only at zoom 13. Your own application may need this data at a lower zoom level.

Modify profile/Buildings.java to populate all Overture properties on zoom 12 instead of zoom 13:

...
OvertureProfile.addFullTags(source, polygon, 12);
...
java -cp planetiler.jar profiles/Buildings.java --data=boston

Inspect the created data/buildings.pmtiles on pmtiles.io to see the additional properties on zoom level 12:

customized buildings tileset