GithubHelp home page GithubHelp logo

tengl / pmtiles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from protomaps/pmtiles

0.0 0.0 0.0 13.5 MB

Cloud-optimized + compressed single-file tile archives for vector and raster maps

Home Page: https://protomaps.com/docs/pmtiles/

License: BSD 3-Clause "New" or "Revised" License

JavaScript 2.62% C++ 12.15% Python 18.88% C 5.70% TypeScript 55.51% Makefile 0.20% HTML 4.93%

pmtiles's Introduction

npm js minzipped size pypi

๐Ÿ”Ž PMTiles Viewer: https://protomaps.github.io/PMTiles/ ๐Ÿ”Ž

PMTiles

PMTiles is a single-file archive format for tiled data. A PMTiles archive can be hosted on a commodity storage platform such as S3, and enables low-cost, zero-maintenance map applications that are "serverless" - free of a custom tile backend or third party provider.

Demos require MapLibre GL JS v1.15 or later.

See also:

Creating PMTiles

Download the pmtiles binary for your system at go-pmtiles/Releases.

pmtiles convert INPUT.mbtiles OUTPUT.pmtiles
pmtiles upload OUTPUT.mbtiles s3://my-bucket?region=us-west-2 // requires AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars to be set

Consuming PMTiles

JavaScript

See js/README.md and js/examples for usage in Leaflet or MapLibre GL JS.

See openlayers/README.md for usage in OpenLayers.

Go

See the go-pmtiles repository.

Python

See https://github.com/protomaps/PMTiles/tree/main/python/bin for library usage

Serverless

PMTiles on AWS Lambda

PMTiles on Cloudflare Workers

Specification

The current specification version is Version 3.

Recipes

Example of how to create a PMTiles archive from the Census Bureau Zip Code Tabulation Areas Shapefile using tippecanoe and the pmtiles standalone binary:

    # use GDAL/OGR to convert SHP to GeoJSON
    ogr2ogr -t_srs EPSG:4326 cb_2018_us_zcta510_500k.json cb_2018_us_zcta510_500k.shp
    # Creates a layer in the vector tiles named "zcta"
    tippecanoe -zg --projection=EPSG:4326 -o cb_2018_us_zcta510_500k_nolimit.mbtiles -l zcta cb_2018_us_zcta510_500k.json
    pmtiles convert cb_2018_us_zcta510_500k_nolimit.mbtiles cb_2018_us_zcta510_500k.pmtiles

Uploading to Storage

Using the PMTiles command line tool:

pmtiles upload LOCAL.pmtiles "s3://BUCKET_NAME?endpoint=https://example.com&region=region" REMOTE.pmtiles

Using RClone (do rclone config first)

rclone copyto LOCAL.pmtiles r2:/BUCKET/REMOTE.pmtiles --progress --s3-chunk-size=256M --s3-upload-concurrency=2

License

The reference implementations of PMTiles are published under the BSD 3-Clause License. The PMTiles specification itself is public domain, or under a CC0 license where applicable.

pmtiles's People

Contributors

bdon avatar jamesscottbrown avatar eddy-geek avatar migurski avatar fscottfoti avatar geospatial-jeff avatar hu0p avatar roblabs avatar bayre avatar blacha avatar bmcbride avatar rouault avatar weskamm avatar flother avatar wipfli avatar nokonoko1203 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.