{"id":13499985,"url":"https://github.com/openmaptiles/openmaptiles","last_synced_at":"2025-04-29T14:26:45.344Z","repository":{"id":15521359,"uuid":"69994043","full_name":"openmaptiles/openmaptiles","owner":"openmaptiles","description":"OpenMapTiles Vector Tile Schema Implementation","archived":false,"fork":false,"pushed_at":"2025-02-28T12:27:52.000Z","size":60036,"stargazers_count":2692,"open_issues_count":198,"forks_count":615,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-04-26T02:08:45.735Z","etag":null,"topics":["maps","openstreetmap","openstreetmap-data","tiles","vector-tiles"],"latest_commit_sha":null,"homepage":"https://openmaptiles.org","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openmaptiles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2016-10-04T18:29:52.000Z","updated_at":"2025-04-25T11:57:56.000Z","dependencies_parsed_at":"2023-01-14T12:45:23.465Z","dependency_job_id":"6444b866-63aa-4797-93be-f4b5745a7c89","html_url":"https://github.com/openmaptiles/openmaptiles","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fopenmaptiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fopenmaptiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fopenmaptiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fopenmaptiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openmaptiles","download_url":"https://codeload.github.com/openmaptiles/openmaptiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251517459,"owners_count":21601983,"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":["maps","openstreetmap","openstreetmap-data","tiles","vector-tiles"],"created_at":"2024-07-31T22:00:49.324Z","updated_at":"2025-04-29T14:26:45.313Z","avatar_url":"https://github.com/openmaptiles.png","language":"PLpgSQL","funding_links":[],"categories":["PLpgSQL","others"],"sub_categories":[],"readme":"## OpenMapTiles [![Build Status](https://github.com/openmaptiles/openmaptiles/workflows/OpenMapTiles%20Integrity%20CI/badge.svg?branch=master)](https://github.com/openmaptiles/openmaptiles/actions)\n\nOpenMapTiles is an extensible and open tile schema based on the OpenStreetMap. This project is used to generate vector tiles for online zoomable maps. OpenMapTiles is about creating a beautiful basemaps with general layers containing topographic information. More information [openmaptiles.org](https://openmaptiles.org/) and [maptiler.com/data/](https://www.maptiler.com/data/).\n\nWe encourage you to collaborate, reuse and adapt existing layers, or add your own layers. You may use our approach for your own vector tile project. Feel free to fork the repo and experiment. The repository is built on top of the [openmaptiles/openmaptiles-tools](https://github.com/openmaptiles/openmaptiles-tools) to simplify vector tile creation.\n\nPlease keep in mind that OpenMapTiles schema should display general topographic content. If creating a new layer or expanding an existing layer with a specific theme, please create a fork and invite other community members to cooperate on your topic. OpenMapTiles schema is used in many projects all over the world and the size of the final vector tiles needs to be considered in any update.\n\n- :link: Schema https://openmaptiles.org/schema\n- :link: Docs https://openmaptiles.org/docs\n- :link: Data for download: https://www.maptiler.com/data/\n- :link: Hosting https://www.maptiler.com/cloud/\n- :link: Create own layer https://github.com/openmaptiles/openmaptiles-skiing\n- :link: Practical usage of OpenMapTiles https://github.com/maptiler/foss4g-workshop\n- :link: Discuss at the #openmaptiles channel at [OSM Slack](https://slack.openstreetmap.us/)\n\n## Styles\n\nYou can start from several GL styles supporting the OpenMapTiles vector schema.\n\n:link: [Learn how to create Mapbox GL styles with Maputnik and OpenMapTiles](http://openmaptiles.org/docs/style/maputnik/).\n\n\n- [OSM OpenMapTiles](./style/README.md)\n- [OSM Bright](https://github.com/openmaptiles/osm-bright-gl-style)\n- [MapTiler Basic](https://github.com/openmaptiles/maptiler-basic-gl-style)\n- [MapTiler 3D](https://github.com/openmaptiles/maptiler-3d-gl-style)\n- [Fiord Color](https://github.com/openmaptiles/fiord-color-gl-style)\n- [MapTiler Toner](https://github.com/openmaptiles/maptiler-toner-gl-style)\n- [OSM Liberty](https://github.com/maputnik/osm-liberty)\n- [Positron](https://github.com/openmaptiles/positron-gl-style)\n- [Dark Matter](https://github.com/openmaptiles/dark-matter-gl-style)\n\nWe also ported over our favorite old raster styles (TM2).\n\n:link: [Learn how to create TM2 styles with Mapbox Studio Classic and OpenMapTiles](http://openmaptiles.org/docs/style/mapbox-studio-classic/).\n\n- [Light](https://github.com/openmaptiles/mapbox-studio-light.tm2/)\n- [Dark](https://github.com/openmaptiles/mapbox-studio-dark.tm2/)\n- [OSM Bright](https://github.com/openmaptiles/mapbox-studio-osm-bright.tm2/)\n- [Pencil](https://github.com/openmaptiles/mapbox-studio-pencil.tm2/)\n- [Woodcut](https://github.com/openmaptiles/mapbox-studio-woodcut.tm2/)\n- [Pirates](https://github.com/openmaptiles/mapbox-studio-pirates.tm2/)\n- [Wheatpaste](https://github.com/openmaptiles/mapbox-studio-wheatpaste.tm2/)\n\n## Schema\n\nOpenMapTiles consists out of a collection of documented and self contained layers you can modify and adapt.\nTogether the layers make up the OpenMapTiles tileset.\n\n:link: [Study the vector tile schema](http://openmaptiles.org/schema)\n\n- [aeroway](https://openmaptiles.org/schema/#aeroway)\n- [boundary](https://openmaptiles.org/schema/#boundary)\n- [building](https://openmaptiles.org/schema/#building)\n- [housenumber](https://openmaptiles.org/schema/#housenumber)\n- [landcover](https://openmaptiles.org/schema/#landcover)\n- [landuse](https://openmaptiles.org/schema/#landuse)\n- [mountain_peak](https://openmaptiles.org/schema/#mountain_peak)\n- [park](https://openmaptiles.org/schema/#park)\n- [place](https://openmaptiles.org/schema/#place)\n- [poi](https://openmaptiles.org/schema/#poi)\n- [transportation](https://openmaptiles.org/schema/#transportation)\n- [transportation_name](https://openmaptiles.org/schema/#transportation_name)\n- [water](https://openmaptiles.org/schema/#water)\n- [water_name](https://openmaptiles.org/schema/#water_name)\n- [waterway](https://openmaptiles.org/schema/#waterway)\n\n## Develop\n\nTo work on OpenMapTiles you need Docker.\n\n- Install [Docker](https://docs.docker.com/engine/installation/). Minimum version is 1.12.3+.\n- Install [Docker Compose](https://docs.docker.com/compose/install/). Minimum version is 1.7.1+.\n\n### Microsoft Windows Subsystem for Linux (WSL)\n\nPlease use Linux `/home/user/` directory, not Windows e.g. `/mnt/c` directory.\n\n### Build\n\nBuild the tileset.\n\n```bash\ngit clone https://github.com/openmaptiles/openmaptiles.git\ncd openmaptiles\n# Build the imposm mapping, the tm2source project and collect all SQL scripts\nmake\n```\n\nYou can execute the following manual steps (for better understanding)\nor use the provided `quickstart.sh` script to automatically download and import given area. If area is not given, Albania will be imported. List of available areas `make list-geofabrik`.\n\n```\n./quickstart.sh \u003carea\u003e\n```\n\n### Prepare the Database\n\nNow start up the database container.\n\n```bash\nmake start-db\n```\n\nImport external data from [OpenStreetMapData](http://osmdata.openstreetmap.de/), [Natural Earth](http://www.naturalearthdata.com/) and [OpenStreetMap Lake Labels](https://github.com/openmaptiles/osm-lakelines). Natural Earth country boundaries are used in the few lowest zoom levels.\n\n```bash\nmake import-data\n```\n\nDownload OpenStreetMap data extracts from any source like [Geofabrik](http://download.geofabrik.de/), and store the PBF file in the `./data` directory. To use a specific download source, use `download-geofabrik`, `download-bbbike`, or `download-osmfr`, or use `download` to make it auto-pick the area. You can use `area=planet` for the entire OSM dataset (very large).  Note that if you have more than one `data/*.osm.pbf` file, every `make` command will always require `area=...` parameter (or you can just `export area=...` first).\n\n```bash\nmake download area=albania\n```\n\n[Import OpenStreetMap data](https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/import-osm) with the mapping rules from\n`build/mapping.yaml` (which has been created by `make`). Run after any change in layers definition (any change in `mapping.yaml`).\n\n```bash\nmake import-osm\n```\n\nImport labels from Wikidata. If an OSM feature has [Key:wikidata](https://wiki.openstreetmap.org/wiki/Key:wikidata), OpenMapTiles check corresponding item in Wikidata and use its [labels](https://www.wikidata.org/wiki/Help:Label) for languages listed in [openmaptiles.yaml](openmaptiles.yaml). So the generated vector tiles includes multi-languages in name field.\n\nThis step uses [Wikidata Query Service](https://query.wikidata.org) to download just the Wikidata IDs that already exist in the database.\n\n```bash\nmake import-wikidata\n```\n\n### Work on Layers\nEach time you modify a layer's `mapping.yaml` file or add new OSM tags, run `make` and `make import-osm` to recreate tables (potentially with additional data) in PostgreSQL. With the new data, there can be new Wikidata records also.\n```\nmake clean\nmake\nmake import-osm\nmake import-wikidata\n```\n\nEach time you modify layer SQL code run `make` and `make import-sql`.\n\n```\nmake clean\nmake\nmake import-sql\n```\n\nEach time you make a modification that adds a new feature to vector tiles e.g. adding new OSM tags, modify the layer \nstyle snippet by adding new style layer so the changes are propagated visually into the style.\nAll new style layers must have the `order` value which determines the order or rendering in the map style. \nAfter the layer style snippet is modified run:\n```bash\nmake build-style\n```\n\n\n\nNow you are ready to **generate the vector tiles**. By default, `./.env` specifies the entire planet BBOX for zooms 0-7, but running `generate-bbox-file` will analyze the data file and set the `BBOX` param to limit tile generation.\n\n```\nmake generate-bbox-file  # compute data bbox -- not needed for the whole planet or for downloaded area by `make download`\nmake generate-tiles-pg   # generate tiles\n```\n\n### Workflow to generate tiles\nIf you go from top to bottom you can be sure that it will generate a .mbtiles file out of a .osm.pbf file\n```\nmake clean                  # clean / remove existing build files\nmake                        # generate build files\nmake start-db               # start up the database container.\nmake import-data            # Import external data from OpenStreetMapData, Natural Earth and OpenStreetMap Lake Labels.\nmake download area=albania  # download albania .osm.pbf file -- can be skipped if a .osm.pbf file already existing\nmake import-osm             # import data into postgres\nmake import-wikidata        # import Wikidata\nmake import-sql             # create / import sql functions \nmake generate-bbox-file     # compute data bbox -- not needed for the whole planet or for downloaded area by `make download`\nmake generate-tiles-pg      # generate tiles\n```\nInstead of calling `make download area=albania` you can add a .osm.pbf file in the `data` folder `openmaptiles/data/your_area_file.osm.pbf`\n\nTo change the name of the output filename, you can modify the variable `MBTILES_FILE` in the `.env` file or set up the environment variable `MBTILES_FILE` before running `./quickstart.sh` or `make generate-tiles-pg` (e.g., `MBTILES_FILENAME=monaco.mbtiles ./quickstart.sh monaco`).\n\n\n## License\n\nAll code in this repository is under the [BSD license](./LICENSE.md). Design and the cartography decisions encoded in the schema and SQL are licensed under [CC-BY](./LICENSE.md).\n\nProducts or services using maps derived from OpenMapTiles schema need to **visibly credit \"OpenMapTiles.org\"** or **reference \"OpenMapTiles\"** with a link to https://openmaptiles.org/. Exceptions to attribution requirement can be granted on request.\n\nFor a browsable electronic map based on OpenMapTiles and OpenStreetMap data, the\ncredit should appear in the corner of the map. For example:\n\n[© OpenMapTiles](https://openmaptiles.org/) [© OpenStreetMap contributors](https://www.openstreetmap.org/copyright)\n\nFor printed and static maps a similar attribution should be made in a textual\ndescription near the image, in the same fashion as if you cite a photograph.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmaptiles%2Fopenmaptiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmaptiles%2Fopenmaptiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmaptiles%2Fopenmaptiles/lists"}