• Stars
    star
    507
  • Rank 87,068 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created about 11 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tilezen vector tile service - OpenStreetMap data in several formats

pre-commit

Tilezen Vector Tiles

The Nextzen vector tile service provides worldwide basemap coverage sourced from OpenStreetMap and other open data projects, updated ~quarterly.

Gitter

Quick links

Contents of an example vector tile

Vector tiles are square-shaped collections of geographic data that contain the map feature geometry, such as lines and points. Information about how map features are drawn is maintained in a separate stylesheet file.

For many purposes, vector tiles are more flexible than raster tiles, which are images that already have the visual appearance of the map features pre-drawn. With vector tiles, there is no need to head back to the server and fetch a different set of tiles if you want to filter the output or change the style of a road or color of a building.

Vector tiles make real-time rendering possible by sending the underlying data geometry and tags directly to the client, whether thatโ€™s a browser or a native mobile app. Buildings and roads can be rendered in different ways, or not at all, when the vector tile is downloaded, and changes happen instantly on the client's side.

With vector tiles you have the power to customize the content and visual appearance of the map. We're excited to see what you build!

Use Nextzen's Vector Tile Service

To start integrating vector tiles to your app, you need a developer API key.

Requesting tiles

The URL pattern to request tiles is:

https://tile.nextzen.org/tilezen/vector/v1/{tilesize}/{layers}/{z}/{x}/{y}.{format}?api_key=your-nextzen-api-key

Hereโ€™s a sample tile in MVT format at 512 size:

https://tile.nextzen.org/tilezen/vector/v1/512/all/16/19293/24641.mvt?api_key=your-nextzen-api-key

Hereโ€™s a sample tile in TopoJSON format at 256 size:

https://tile.nextzen.org/tilezen/vector/v1/256/all/16/19293/24641.topojson?api_key=your-nextzen-api-key

More information is available about how to use the vector tile service and specify custom layers in the service (though we recommend the default all layer).

Formats

The Tilezen vector tile stack provides tiles in a variety of formats (service docs):

  • Mapbox Vector Tile: use the .mvt extension. This is a compact format using protocol buffers that is used for raster tile rendering in TileMill2 and vector rendering in MapboxGL.

  • TopoJSON: use the .topojson extension. TopoJSON is an optimized form of GeoJSON that saves space by encoding topology and reducing replication of shared geometry.

  • GeoJSON: use the .json extension. GeoJSON is easy to get started with, human-readable, and compatible with many tools.

    We recommend TopoJSON format for desktop web development, and MVT format for native mobile development. The Nextzen vector tile service gzips tiles automatically, so the TopoJSON file format is comparable in file size to MVT over the wire, and it's much friendlier to debug.

Drawing a map

How to draw the tile in a browser is up to the vector-friendly visualization tool, such as SVG, Canvas, or WebGL. The Tangram rendering engine, which uses WebGL, is one way that you can draw the vector tile service in 2D and 3D maps.

How are vector tiles produced?

Vector tiles are served by clipping geometries to the tile bounding box, and then simplified to match the zoom level to avoid unnecessary complexity at lower zoom levels. These geometries and features are also further processed to facilitate styling.

When changes are made to OpenStreetMap or another map data sources, rather than waiting for an image tile to be redrawn, only the geometry coordinates and feature attributes for that particular building or road need to be updated in the vector tile.

Depending on the URL syntax, Mapzen vector tiles can return all of the map data, or just individual layers, or combinations of layers, including water, earth, landuse, roads, buildings and points of interest(POI).

Build from source

If you are interested in setting up your own version of this service, follow these installation instructions, or use Docker!

Tests

There is a suite of tests which can be run against a tile server to verify query results in well known tiles.

Credits

This is based on the work of Michal Migurski, and extends his OSM.US-hosted vector tile service with additional data and format support.

More Repositories

1

joerd

Joerd can be used to download, merge and generate tiles from digital elevation data
Python
319
star
2

mapbox-vector-tile

Python package for encoding & decoding Mapbox Vector Tiles
Python
242
star
3

tileserver

A lightweight tileserver to share code paths with tilequeue for tile generation.
Python
79
star
4

tilequeue

Queue operations to manage the processes surrounding tile rendering.
Python
46
star
5

tapalcatl-py

A simpler, less configurable Python port of Tapalcatl suitable for AWS Lambda. Extracts vector tiles from ZIP metatiles stored on S3.
Python
20
star
6

tapalcatl

Tapalcatl is a "metatile server", which attempts to serve individual tiles extracted from an archive in storage.
Go
14
star
7

go-tilepacks

A Go-based tile downloader that saves to deduplicated mbtiles files.
Go
13
star
8

zaloa

Merges terrain tiles together from 256 to 512 and buffered sizes
Python
13
star
9

raw_tiles

Raw tiles
Python
12
star
10

tilepacks

Tools to build tile packages meant for offline usage.
Python
9
star
11

xonacatl

Tile layers server
Go
8
star
12

scoville

Scoville is a tile latency testing and dissection tool.
Python
7
star
13

chef-tilestache

Chef cookbook to install and configure tilestache
Ruby
6
star
14

tileops

Automated scripts for building Tilezen tiles.
Python
6
star
15

satellite-imagery-tiles

Gathering place for satellite and imagery sources and public feedback
4
star
16

neatlacoche

Neatlacoche is a tool for splitting the OpenStreetMap history planet into tiles, which are known as "Non-Editorialised Analysis Tiles" or NEAT tiles.
Go
4
star
17

osm2pgsql-ec2

Experiments with building an EC2 instance that runs postgres+osm2pgsql and updates itself.
Shell
3
star
18

go-zaloa

A Go port of Zaloa for terrain tiles.
Go
3
star
19

coanacatl

Coanacatl is a pre-alpha, very buggy, proof-of-concept Python library wrapping Mapbox's Wagyu and vtzero libraries to write Mapbox Vector Tile files from Shapely geometries.
C++
3
star
20

chef-tileserver

Chef cookbook to install and configure tileserver
Ruby
3
star
21

chef-minutely_mapnik

Chef cookbook to assist with installing minutely mapnik
Ruby
2
star
22

transport-spider

Utility to walk networks of public transport relations and produce graphics.
Ruby
1
star
23

chef-history-analysis

Chef setup for OSM history analysis VMs.
Ruby
1
star