{"id":17645184,"url":"https://github.com/dechristopher/xyz","last_synced_at":"2025-05-07T03:46:14.608Z","repository":{"id":45497842,"uuid":"293858310","full_name":"dechristopher/xyz","owner":"dechristopher","description":"Simple tool to procedurally prime XYZ tile caches to a given zoom level.","archived":false,"fork":false,"pushed_at":"2023-04-23T13:18:43.000Z","size":323,"stargazers_count":29,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T03:46:09.314Z","etag":null,"topics":["cache","gis","map","maps","mvt","open","osm","png","primer","raster","street","tile","vector","xyz"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dechristopher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"dechristopher"}},"created_at":"2020-09-08T15:54:16.000Z","updated_at":"2025-03-18T07:33:52.000Z","dependencies_parsed_at":"2024-01-17T03:17:31.401Z","dependency_job_id":"47573564-8684-4d78-aff4-7d226a44d879","html_url":"https://github.com/dechristopher/xyz","commit_stats":null,"previous_names":["dechristopher/xyz-cache-primer"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fxyz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fxyz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fxyz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Fxyz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dechristopher","download_url":"https://codeload.github.com/dechristopher/xyz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810274,"owners_count":21807759,"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":["cache","gis","map","maps","mvt","open","osm","png","primer","raster","street","tile","vector","xyz"],"created_at":"2024-10-23T10:53:32.238Z","updated_at":"2025-05-07T03:46:14.591Z","avatar_url":"https://github.com/dechristopher.png","language":"Go","funding_links":["https://github.com/sponsors/dechristopher"],"categories":["CLI Utilities"],"sub_categories":[],"readme":"# XYZ Tile Cache Primer\n\u003cp align=\"center\"\u003e\u003cimg src=\".github/xyz.png\" width=\"384\" alt=\"XYZ Logo\"\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/dechristopher/xyz/actions\"\u003e\u003cimg alt=\"XYZ Build Status\" src=\"https://github.com/dechristopher/xyz/workflows/Build/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/dechristopher/xyz\"\u003e\u003cimg alt=\"XYZ Go Report Card\" src=\"https://goreportcard.com/badge/github.com/dechristopher/xyz\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n- [About](#about)\n- [Usage](#usage)\n  - [Flags](#flags)\n  - [Examples](#examples)\n- [Roadmap](#roadmap)\n- [Releases](#releases)\n- [Map Tiles Overview](#map-tiles-overview)\n  - [Zoom Level](#zoom-level)\n\n## About\nThis tool, given the URL to an XYZ tile caching proxy, will procedurally generate\nand execute requests for every tile at every zoom level up to the maximum zoom level\nspecified. Concurrency is optional and configurable. Headers for authentication or\nuser agent spoofing can be specified using [command line flags](#usage).\n\n## Usage\nThe design of XYZ is as simple as possible. It will not have a rich feature set\nprimarily because the scope of the problem it solves isn't very wide. Here is a\nbrief overview on how to use the tool in its entirety:\n\n### Flags\n```\n  --url    Templated cache URL to prime. Ex: tile.company.com/{x}/{y}/{z}.png\n  --zoom   Max zoom depth to prime to. Usually in the range of 0-18 but can go deeper.\n  --cc     Maximum request concurrency. Defaults to 4 simultaneous requests.\n             Take care not to exceed the rate limits of your tile provider!\n  --header Add headers to all requests. Usage `--header name:value`.\n  --help   Shows this help menu.\n```\n\n### Examples\n```\n  xyz --url tile.company.com/{x}/{y}/{z}.png\n  xyz --url tile.company.com/{x}/{y}/{z}.png --zoom 8\n  xyz --url tile.company.com/{x}/{y}/{z}.png --zoom 8 --cc 16\n  xyz --url tile.company.com/{x}/{y}/{z}.png --header X-Auth-Token:8675309abcd\n```\n\n## Roadmap\n* Improve HTTP request performance [(#3)][i3]\n* Shrink HTTP response memory footprint [(#4)][i4]\n* Improve concurrency model [(#5)][i5]\n\n## Releases\nTo get a copy of XYZ, either visit the [releases page](https://github.com/dechristopher/xyz/releases)\nor clone the repo and compile it yourself.\n\n\u003e The current Go version requirement to build is 1.14+\n\n## Map Tiles Overview\nSplitting the world into square tiles is a simple way to distribute geographic information and metadata to devices.\nFrom raster data representing illustrated or generated cartography to vector data representing infrastructure and other\narbitrary geometries, tiles optimize the time and space necessary to gather pieces of grographic information. This\nallows us to quickly illustrate a geographic region and its associated attributes.\n\n### Zoom Level\nThe zoom parameter is an integer between 0 (zoomed out) and 18 (zoomed in). 18 is normally the maximum, but some tile\nservers might go beyond that. A tile at a given zoom level will split into four equally sized tiles at the next\nzoom level.\n\n| Level | # Tiles | Tile width (° of longitudes) | m / pixel (on Equator) | ~ Scale(on screen) | Examples of areas to represent|\n|-------|---------|------------------------------|------------------------|--------------------|-------------------------------|\n| 0 | 1 |360 |156,412 |1:500m |whole world |\n|1 | 4 | 180 | 78,206 | 1:250m |\n|2 | 16 | 90 | 39,103 | 1:150m | subcontinental area |\n|3 | 64 | 45 | 19,551 | 1:70m | largest country |\n|4 | 256 | 22.5 | 9,776 | 1:35m |\n|5 | 1,024 | 11.25 | 4,888 | 1:15m | large African country |\n|6 | 4,096 | 5.625 | 2,444 | 1:10m | large European country |\n|7 | 16,384 | 2.813 | 1,222 | 1:4m | small country, US state |\n|8 | 65,536 | 1.406 | 610.984 | 1:2m |\n|9 | 262,144 | 0.703 | 305.492 | 1:1m | wide area, large metropolitan area |\n|10 | 1,048,576 | 0.352 | 152.746 | 1:500k | metropolitan area |\n|11 | 4,194,304 | 0.176 | 76.373 | 1:250k | city |\n|12 | 16,777,216 | 0.088 | 38.187 | 1:150k | town, or city district |\n|13 | 67,108,864 | 0.044 | 19.093 | 1:70k | village, or suburb |\n|14 | 268,435,456 | 0.022 | 9.547 | 1:35k |\n|15 | 1,073,741,824 | 0.011 | 4.773 | 1:15k | small road |\n|16 | 4,294,967,296 | 0.005 | 2.387 | 1:8000 | street |\n|17 | 17,179,869,184 | 0.003 | 1.193 | 1:4000 | block, park, addresses |\n|18 | 68,719,476,736 | 0.001 | 0.596 | 1:2000 | some buildings, trees |\n|19 | 274,877,906,944 | 0.0005 | 0.298 | 1:1000 | local highway and crossing details |\n|20 | 1,099,511,627,776 | 0.00025 | 0.149 | 1:500 | A mid-sized building |\n\n- The \"# Tiles\" column indicates the number of tiles needed to show the entire world at the given zoom level.\nThis is useful when calculating storage requirements for pre-generated tiles.\n- The \"° Tile width\" column gives the map width in degrees of longitude, for a square tile drawn at that zoom level.\n- Values listed in the column \"m / pixels\" gives the number of meters per pixel at that zoom level. These values for\n \"m / pixel\" are calculated with an Earth radius of 6372.7982 km and hold at the Equator; for other latitudes the values\n must be multiplied by the cosine (approximately assuming a perfect spheric shape of the geoid) of the latitude.\n\nRef: https://wiki.openstreetmap.org/wiki/Zoom_levels\n\n[i3]: https://github.com/dechristopher/xyz/issues/3\n[i4]: https://github.com/dechristopher/xyz/issues/4\n[i5]: https://github.com/dechristopher/xyz/issues/5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdechristopher%2Fxyz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdechristopher%2Fxyz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdechristopher%2Fxyz/lists"}