{"id":19292363,"url":"https://github.com/openaddresses/tilebase","last_synced_at":"2025-07-01T06:35:22.754Z","repository":{"id":41981858,"uuid":"356975914","full_name":"openaddresses/TileBase","owner":"openaddresses","description":"Range based Single File MBTiles like Store","archived":false,"fork":false,"pushed_at":"2022-11-23T19:28:10.000Z","size":3513,"stargazers_count":17,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T05:28:25.862Z","etag":null,"topics":["mbtiles","vector-tiles"],"latest_commit_sha":null,"homepage":"https://openaddresses.github.io/TileBase/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openaddresses.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"open_collective":"openaddresses"}},"created_at":"2021-04-11T20:47:02.000Z","updated_at":"2024-09-23T22:45:13.000Z","dependencies_parsed_at":"2023-01-21T21:49:50.680Z","dependency_job_id":null,"html_url":"https://github.com/openaddresses/TileBase","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/openaddresses/TileBase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openaddresses%2FTileBase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openaddresses%2FTileBase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openaddresses%2FTileBase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openaddresses%2FTileBase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openaddresses","download_url":"https://codeload.github.com/openaddresses/TileBase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openaddresses%2FTileBase/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262914205,"owners_count":23383846,"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","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":["mbtiles","vector-tiles"],"created_at":"2024-11-09T22:30:11.676Z","updated_at":"2025-07-01T06:35:22.730Z","avatar_url":"https://github.com/openaddresses.png","language":"JavaScript","funding_links":["https://opencollective.com/openaddresses"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=center\u003eTileBase\u003c/h1\u003e\n\u003cp align=center\u003eRange Based Single File MBTiles-like Tile Store\u003c/p\u003e\n\n## Usage\n\nTileBase can be accessed in several ways through the following client libraries\n\n| Language | Link |\n| -------- | ---- |\n| NodeJS   | [USAGE](https://openaddresses.github.io/TileBase/)\n\n## Command Line Library\n\nThe default command line requires that node be installed. The easiest way to do this\nis usually via [NVM](https://github.com/nvm-sh/nvm)\n\nOnce node is installed, from the git repository, run the following to install\ndependencies.\n\n\n```sh\nnpm install\n```\n\n```sh\nnpm link\n```\n\nThe TileBase cli should now be able to be used from your command line via\n\n```sh\ntilebase --help\n```\n\n## Format Spec (v1)\n\nA TileBase file is designed as a single file tile store. It is functionally similiar to a MBTiles file,\nexcept it is optimized for Cloud Storage based serving and does not allow dynamic updates.\n\nTileBase files allow Ranged requests from Cloud Storage providers, avoiding the generally expensive\noperation of pushing individual tiles to the store.\n\n__TileBase File__\n```\n\u003cMagic Bytes\u003e\u003cVersion\u003e\u003cFile Config Length\u003e\n\u003cVariable Length File Config\u003e\n\u003cVariable Length Tile Addresses\u003e\n\u003cVariable Length Tile Data\u003e\n```\n\n### File Header\n\nEvery TileBase file will begin with `74 62` (`tb` in ASCII)  followed by an 8-bit unsigned integer\nrepresenting the TileBase spec version number.\n\nSince there is currently only one version of the spec, all TileBase files will start with the following:\n```\n74 62 01\n```\n\nFollowing the Magic Bytes is a single 32 bit unsigned Little Endian Integer containing the number of following bytes\nthat make up the JSON file config.\n\n```\n74\n62      tb Magic Bytes\n01      1\nD3\n04\n00\n00      1234 bytes\n```\n\nThis means that the max number of bytes in the JSON config is 4294967295 bytes (~4gb)\n\n### File Config\n\nAfter the header, a stringified JSON object contains the config necessary to read the\nTileBase file. The length of the binary JSON config MUST be equal to the length\nspecifier preceding the config.\n\n```\n{\n    \"min\": \u003cmin zoom\u003e,\n    \"max\": \u003cmax zoom\u003e,\n    \"ranges\": {\n        \"\u003czoom\u003e\": [\u003cmin x\u003e, \u003cmin y\u003e, \u003cmax x\u003e, \u003cmax y\u003e]\n        ...\n    }\n}\n```\n\n### Tile Addresses\n\nAfter the JSON config is a block of Tile Addresses. There will be one tile\naddress for every tile that would fall within the rectangular `ranges` array.\nShould a vector tile be empty, it will have a `Byte Address` to where the tile\nwould have been in the file, however with a `Vector Tile Size` of 0.\n\nByte addresses reference the number of bytes to the initial byte from the end\nof the TileAddresses Block.\n\nIE: the first byte address of any TileBase file will be 0, as it will be the\nfirst byte after the Tile Addresses block.\n\n_Example: Single Tile Address_\n```\n\u003cLE-UInt64 Address\u003e\u003cLE-UInt64 Vector Tile Size\u003e\n```\n\n### Tile Data\n\nTile Data is simply a blob of continuous gzipped Mapbox Vector Tiles. Their order\nis determined simply by the order in which they are reference by the Tile\nAddress blob.\n\n### Error Handling\n\nErrors returned via the TileBase library will return a TBError, an extension to the default\nJS `Error` class with the addition of a `status` field. The status field will contain a suggested\nHTTP Status code to return to a user in a server setting.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenaddresses%2Ftilebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenaddresses%2Ftilebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenaddresses%2Ftilebase/lists"}