{"id":14036053,"url":"https://github.com/mapbox/tilelive","last_synced_at":"2025-07-27T03:31:19.420Z","repository":{"id":1381565,"uuid":"1336019","full_name":"mapbox/tilelive","owner":"mapbox","description":"fast interface to tiles with pluggable backends - NOT ACTIVELY MAINTAINED","archived":false,"fork":false,"pushed_at":"2024-04-25T19:46:51.000Z","size":4192,"stargazers_count":532,"open_issues_count":32,"forks_count":107,"subscribers_count":143,"default_branch":"master","last_synced_at":"2025-07-18T02:29:57.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapbox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-02-07T00:07:18.000Z","updated_at":"2025-04-10T06:03:38.000Z","dependencies_parsed_at":"2024-06-18T13:22:08.271Z","dependency_job_id":"2a31ce0c-2bda-41dc-8d65-6807c7107e7f","html_url":"https://github.com/mapbox/tilelive","commit_stats":{"total_commits":786,"total_committers":39,"mean_commits":"20.153846153846153","dds":0.7798982188295165,"last_synced_commit":"562fea5d5cd5fc0c91fa9370de44c29c22d24a3c"},"previous_names":["mapbox/tilelive.js"],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/mapbox/tilelive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Ftilelive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Ftilelive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Ftilelive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Ftilelive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapbox","download_url":"https://codeload.github.com/mapbox/tilelive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Ftilelive/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267294180,"owners_count":24065343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-12T03:01:49.111Z","updated_at":"2025-07-27T03:31:18.606Z","avatar_url":"https://github.com/mapbox.png","language":"JavaScript","readme":"# tilelive.js\n\n[![Build Status](https://travis-ci.com/mapbox/tilelive.svg?branch=master)](https://travis-ci.com/mapbox/tilelive)\n[![Coverage Status](https://coveralls.io/repos/github/mapbox/tilelive/badge.svg?branch=master)](https://coveralls.io/github/mapbox/tilelive?branch=master)\n\n:warning: tilelive and related mapbox-owned tilelive plugins are not actively maintained. Please open a new issue to check with the project maintainers before beginning work on new features.\n\n---\n\nTilelive is designed for streaming map tiles from _sources_ (like custom geographic data formats) to _sinks_ (destinations, like file systems) by providing a consistent API. This repository enables the interaction between sources and sinks and is meant to be used in tandem with at least one Tilelive plugin. Tilelive plugins (modules) follow a consistent architecture (defined in [API.md](https://github.com/mapbox/tilelive/blob/master/API.md)) and implement the logic for generating and reading map tiles from a source or putting map tiles to a destination, or both.\n\nAn example of a plugin that implements both reading (can be a source) and writing (can be a sink) is [tilelive-s3](https://github.com/mapbox/tilelive-s3).\n\nAn example use case for tilelive is creating vector tiles from a geojson file and putting them to Amazon S3. This can be accomplished by using [tilelive-omnivore](https://github.com/mapbox/tilelive-omnivore) as the source and using [tilelive-s3](https://github.com/mapbox/tilelive-s3) as the sink. Tilelive omnivore performs special operations for generating map tiles (using mapnik), whereas tilelive-s3 is able to properly connect to Amazon S3 for putting tiles in their proper location. The Tilelive module performs all of the getting and putting within `tilelive.copy`.\n\nBasic tilelive steps:\n\n1. Require tilelive in your script, `var tilelive = require('@mapbox/tilelive')`\n1. Register custom protocols via plugins, `CustomTileSourcePlugin.registerProtocols(tilelive)` or `CustomTileSinkPlugin.registerProtocols(tilelive)`\n1. Load protocols using `tilelive.load`, this creates read and write streams\n1. Copy from source to destination (the creating of tiles is left to the plugin) using `tilelive.copy(source, sink, callback)`\n1. Once tiles are copied the streams are closed\n\nSee [Usage](#Usage) for more details on the tilelive module API.\n\n## Awesome tilelive modules\n\n- [tilelive-vector](https://github.com/mapbox/tilelive-vector) - Implements the tilelive API for rendering mapnik vector tiles to raster images.\n- [tilelive-bridge](https://github.com/mapbox/tilelive-bridge) - Implements the tilelive API for generating mapnik vector tiles from traditional mapnik datasources.\n- [tilelive-mapnik](https://github.com/mapbox/tilelive-mapnik) - mapnik renderer backend for tilelive.\n- [tilelive-s3](https://github.com/mapbox/tilelive-s3) - Extends TileJSON for S3-specific tasks.\n- [tilelive-file](https://github.com/mapbox/tilelive-file) - tilelive.js adapter for reading from the filesystem.\n- [tilelive-postgis](https://github.com/stepankuzmin/tilelive-postgis) - A tilelive source for outputting PBF-encoded tiles from PostGIS.\n- [tilelive-tmsource](https://github.com/mojodna/tilelive-tmsource) - A tilelive provider for TM2 sources.\n- [tilelive-cache](https://github.com/mojodna/tilelive-cache) - A caching wrapper for tilelive.js\n- [tilelive-overlay](https://github.com/mapbox/tilelive-overlay) - Render GeoJSON features with simplestyle styles in a tilelive pipeline.\n- [tilelive-tmstyle](https://github.com/mojodna/tilelive-tmstyle) - A tilelive provider for tmstyle sources.\n- [tilelive-http](https://github.com/mojodna/tilelive-http) - An HTTP source for tilelive.\n- [node-mbtiles](https://github.com/mapbox/node-mbtiles) - A mbtiles renderer and storage backend for tilelive.\n- [tl](https://github.com/mojodna/tl) - An alternate command line interface to tilelive.\n- [tilelive-omnivore](https://github.com/mapbox/tilelive-omnivore) - Implements the tilelive api for a variety of data sources.\n- [tilelive-xray](https://github.com/mojodna/tilelive-xray) - Tilelive vector tile visualization.\n- [tilelive-merge](https://github.com/mojodna/tilelive-merge) - A tilelive source that merges sources.\n- [tilelive-streaming](https://github.com/mojodna/tilelive-streaming) - Streaming functionality for tilelive modules.\n- [tilelive-redis](https://github.com/mapbox/tilelive-redis) - Redis wrapping source for tilelive.\n- [tilelive-modules](https://github.com/mojodna/tilelive-modules) - A listing of known tilelive modules.\n- [tilelive-decorator](https://github.com/mapbox/tilelive-decorator) - Load vector tiles from a tilelive source and decorate them with properties from redis.\n- [tilelive-blend](https://github.com/mojodna/tilelive-blend) - A tilelive provider that blends.\n- [tilelive-carto](https://github.com/mojodna/tilelive-carto) - A Carto style source for tilelive\n- [mongotiles](https://github.com/vsivsi/mongotiles) - mongotiles is a tilelive backend plug-in for MongoDB GridFS.\n- [tilelive-rasterpbf](https://github.com/mojodna/tilelive-rasterpbf) - A tilelive source for outputting PBF-encoded rasters from PostGIS.\n- [tilelive-memcached](https://github.com/mapbox/tilelive-memcached) - A memcached wrapping source for tilelive.\n- [tilelive-csvin](https://github.com/mojodna/tilelive-csvin) - A streaming tilelive source for CSV inputs.\n- [tilelive-tms](https://github.com/oscarfonts/tilelive-tms) - A tilelive.js adapter for reading from a TMS service.\n- [tilelive-multicache](https://github.com/mapbox/tilelive-multicache) - Module for adding a caching layer in front a tilelive source.\n- [tilelive-cardboard](https://github.com/mapbox/tilelive-cardboard) - Renders vector tiles from a cardboard dataset.\n- [tilelive-utfgrid](https://github.com/mojodna/tilelive-utfgrid) - A tilelive provider that treats grids as tiles\n- [tilelive-arcgis](https://github.com/FuZhenn/tilelive-arcgis) - A tilelive.js adapter for ArcGIS tile caches.\n- [tilelive-mapbox](https://github.com/mojodna/tilelive-mapbox) - A tilelive.js source for mapbox:// URIs.\n- [tilelive-solid](https://github.com/mojodna/tilelive-solid) - A tilelive provider that generates solid colored tiles.\n- [tilelive-raster](https://github.com/mojodna/tilelive-raster) - A tilelive source for simple rasters, both local and remote.\n- [tilelive-null](https://github.com/mojodna/tilelive-null) - A noop sink for tilelive.\n- [tilelive-noop](https://github.com/mapbox/tilelive-noop) - A no-op tilelive source.\n- [tilelive-csv](https://github.com/mojodna/tilelive-csv) - PBF → CSV with tilelive.\n- [tilelive-error](https://github.com/mojodna/tilelive-error) - Avoid repeating error-prone initialization.\n- [tilelive-lambda](https://github.com/mojodna/tilelive-lambda) - AWS Lambda source for tilelive.\n- [tilelive-cartodb](https://github.com/mojodna/tilelive-cartodb) - A tilelive source for CartoDB.\n- [@kartotherian/cassandra](https://github.com/kartotherian/cassandra) - A tilelive source to store tiles in a Cassandra DB\n- [@kartotherian/postgres](https://github.com/kartotherian/postgres) - A tilelive source to store tiles in a Postgres DB\n- [cdbtiles](https://github.com/vsivsi/cdbtiles) - A tilelive backend plug-in for CouchDB.\n- [node-tilejson](https://github.com/mapbox/node-tilejson) - Tile source backend for online tile sources.\n- [tilelive-foxgis](https://github.com/FoxGIS/tilelive-foxgis) - A tilelive plugin to serve tiles with mongodb\n- [tessera](https://github.com/mojodna/tessera) - A tilelive-based tile server.\n- [tilelive-pgquery](https://github.com/nyurik/tilelive-pgquery) - A tilelive plugin that runs PostgreSQL queries whose result is a binary MVT, e.g. using ST_AsMVT().  Supports connection pooling. Designed for large-scale tile generation.\n\n## Ecosystem of tilelive\n![image](https://cloud.githubusercontent.com/assets/1522494/16645056/a8f8fff2-4453-11e6-8ba7-b9aff033f2cd.png)\n\n## Usage\n\nTilelive doesn't ship with any implementing modules by default. To register a module as one tilelive recognizes:\n\n```javascript\nrequire('[implementation]').registerProtocols(tilelive);\n```\n\n* `tilelive.list(source, callback)`: Lists all tilesets in a directory. `source` is a folder that is used by registered implementations to search for individual tilesets. `callback` receives an error object (or `null`) and a hash with keys being Tilestore IDs and values being Tilestore URIs. Example:\n\n      {\n          \"world-light\": \"mbtiles:///path/to/file/world-light.mbtiles\",\n          \"mapquest\": \"tilejson:///path/to/file/mapquest.tilejson\"\n      }\n\n* `tilelive.findID(source, id, callback)`: Looks for a particular tileset ID in a directory. `callback` receives an error object (or `null`) and the URI of the tileset.\n\n* `tilelive.load(uri, callback)`: Loads the Tilestore object associated with the specified `uri`. `callback` receives an error object (or `null`) and the [Tilestore object](API.md).\n\n* `tilelive.info(uri, callback)`: Loads the Tilestore object associated with the specified `uri` and retrieves its metadata in a [TileJSON](http://github.com/mapbox/tilejson-spec) compliant format. `callback` receives an error object (or `null`), the metadata hash and the Tilestore object.\n\n* `tilelive.all(source, callback)`: Loads metadata in a [TileJSON](http://github.com/mapbox/tilejson-spec) compliant format for all tilesets in the `source` directory. `callback` receives an error object (or `null`) and an array with TileJSON metadata about each tileset in that directory.\n\n* `tilelive.verify(tilejson)`: Validates a TileJSON object and returns error objects for invalid entries.\n\n## Read/write streams\n\nTilelive provides an implementation of node object streams for copying tiles from one source to another.\n\n```javascript\n// Copy all tiles and metadata from source A to source B.\nvar get = tilelive.createReadStream(sourceA);\nvar put = tilelive.createWriteStream(sourceB);\nget.pipe(put);\nput.on('finish', function() {\n    console.log('done!');\n});\n```\n\nSee the `tilelive-copy` CLI and the streams tests for example usage of copy streams.\n\n## Parallel read streams\n\nTilelive can split a read operation into an arbitrary number of jobs. Pass a `job` parameter to options when using `tilelive.createReadStream` or `tilelive.deserialize`:\n\n```javascript\nvar readable = tilelive.createReadStream(src, { type: 'scanline', job: { total: 4, num: 1 } });\n```\n\nThis instructs tilelive to only read tiles that would fall into job `1` of `4`. A complete read would mean four calls each with a different `num`.\n\n## bin/tilelive-copy\n\ntilelive can be used to copy data between tilestores. The CLI tool uses tilelive.auto() to register plugins by filename. For example, file.mbtiles will result in using the `mbtiles:` protocol and the `@mapbox/mbtiles` module.\n\n```shell\n# usage\ntilelive-copy \u003csrc\u003e \u003cdst\u003e\n\n# example\ntilelive-copy orig.mbtiles copy.mbtiles\n```\n\nOptions:\n\n* **--scheme**=[scanline,pyramid,list] - Default: scanline.\n* **--list**=[filepath] - Filepath if scheme is list.\n* **--concurrency**=[number] - Control on the number of pending I/O operations with the underlying source during copy. Note: this is not CPU concurrency, which is handled by individual plugins typically by setting UV_THREADPOOL_SIZE=[number] as an environment variable.\n* **--withoutprogress** - Shows progress by default.\n* **--timeout**=[number] - Timeout after `n` ms of inactivity.\n* **--slow**=[number] - Warn on slow tiles.\n* **--exit** - Exit explicitly when copy is complete.\n* **--bounds**=[w,s,e,n] - as defined by the [TileJSON specification](https://github.com/mapbox/tilejson-spec)\n* **--minzoom**=[number] - as defined by the [TileJSON specification](https://github.com/mapbox/tilejson-spec)\n* **--maxzoom**=[number] - as defined by the [TileJSON specification](https://github.com/mapbox/tilejson-spec)\n* **--parts**=[number] - total number of parts to copy (part splitting is used for processing in parallel, where specific parts only copy specific tiles from the tile pyramid)\n* **--part**=[number] - the specific part to copy\n* **--retry**=[number] - number of retry attempts\n\n## Tests\n\nTo run the tests\n\n    npm test\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Ftilelive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapbox%2Ftilelive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Ftilelive/lists"}