{"id":18678218,"url":"https://github.com/openmaptiles/planetiler-openmaptiles","last_synced_at":"2026-01-21T23:04:04.138Z","repository":{"id":37699286,"uuid":"494041163","full_name":"openmaptiles/planetiler-openmaptiles","owner":"openmaptiles","description":"OpenMapTiles Vector Tile Schema implementation in Java for Planetiler tool","archived":false,"fork":false,"pushed_at":"2026-01-15T11:02:11.000Z","size":660,"stargazers_count":99,"open_issues_count":18,"forks_count":99,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-15T16:07:34.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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":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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-19T11:23:22.000Z","updated_at":"2026-01-15T11:02:22.000Z","dependencies_parsed_at":"2023-10-03T17:25:06.070Z","dependency_job_id":"2742b81a-33b3-45ae-9b23-5cf198c151d7","html_url":"https://github.com/openmaptiles/planetiler-openmaptiles","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/openmaptiles/planetiler-openmaptiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fplanetiler-openmaptiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fplanetiler-openmaptiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fplanetiler-openmaptiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fplanetiler-openmaptiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openmaptiles","download_url":"https://codeload.github.com/openmaptiles/planetiler-openmaptiles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmaptiles%2Fplanetiler-openmaptiles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28646586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-07T09:36:23.883Z","updated_at":"2026-01-21T23:04:04.124Z","avatar_url":"https://github.com/openmaptiles.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Planetiler OpenMapTiles Profile\n\nThis OpenMapTiles profile for [Planetiler](https://github.com/onthegomap/planetiler) is based\non [OpenMapTiles](https://github.com/openmaptiles/openmaptiles).\n\n## How to run\n\nUsing pre-built docker image:\n\n```bash\ndocker run --rm -v \"$(pwd)/data\":/data openmaptiles/planetiler-openmaptiles:latest --force --download --area=monaco\n```\n\nOr to build from source, after [installing Java 21+](https://adoptium.net/installation):\n\n```bash\n# Build the project (use mvnw.cmd on windows):\n./mvnw clean package\n# Then run:\njava -jar target/*with-deps.jar --force --download --area=monaco\n```\n\nSee [Planetiler README.md](https://github.com/onthegomap/planetiler/blob/main/README.md) for more description of the\navailable options.\n\n## Differences from OpenMapTiles\n\n- Road name abbreviations are not implemented yet in the `transportation_name` layer\n- `brunnel` tag is excluded from `transportation_name` layer to avoid breaking apart long `transportation_name`\n  lines, to revert this behavior set `--transportation-name-brunnel=true`\n- `rank` field on `mountain_peak` linestrings only has 3 levels (1: has wikipedia page and name, 2: has name, 3: no name\n  or wikipedia page or name)\n- Some line and polygon tolerances are different, can be tweaked with `--simplify-tolerance` parameter\n- For bigger bays whose label points show above Z9, centerline is used for Z9+\n- MVT IDs encoded as `{ID} * 10 + {1 for OSM nodes, 2 for OSM ways, 3 for OSM relations, 0 for any other source}` by default\n\n## Customizing\n\nIf you want to exclude layers or only include certain layers, then run the project\nwith  `--exclude-layers=poi,housenumber,...` or `--only-layers=water,transportation,...` command-line arguments.\n\nIf you want to customize existing layers in OpenMapTiles, then fork this repo, find the appropriate class from\nthe [layers package](src/main/java/org/openmaptiles/layers), and make a change to where it processes output features.\n\n\u003cdetails\u003e\n\u003csummary\u003e\nExample adding an attribute to a built-in layer\n\u003c/summary\u003e\n\nFor example to copy over the name attribute from OpenStreetMap elements to the building layer,\nmodify [Building.java](src/main/java/org/openmaptiles/layers/Building.java):\n\n```diff\n@@ -166,6 +166,7 @@ public class Building implements\n         .setAttrWithMinzoom(Fields.RENDER_MIN_HEIGHT, renderMinHeight, 14)\n         .setAttrWithMinzoom(Fields.COLOUR, color, 14)\n         .setAttrWithMinzoom(Fields.HIDE_3D, hide3d, 14)\n+        .setAttrWithMinzoom(\"name\", element.source().getTag(\"name\"), 14)\n         .setSortKey(renderHeight);\n       if (mergeZ13Buildings) {\n         feature\n```\n\n\u003c/details\u003e\n\nIf you want to generate a mbtiles file with OpenMapTiles base layers plus some extra ones then fork this repo and:\n\n1. Create a new class that implements the [`Layer` interface](src/main/java/org/openmaptiles/Layer.java) in\n   the [addons package](src/main/java/org/openmaptiles/addons) and make the `public String name()` method return the ID\n   of the new layer.\n2. Make the new class implement interfaces from `OpenMapTilesProfile` to register handlers for elements from input\n   sources. For example implement `OpenMapTilesProfile.OsmAllProcessor` to handle every OSM element from `processAllOsm`\n   method. See the [built-in layers](src/main/java/org/openmaptiles/layers) for examples.\n3. Create a new instance of that class from the [`ExtraLayers`](src/main/java/org/openmaptiles/addons/ExtraLayers.java)\n   class.\n\n\u003cdetails\u003e\n\u003csummary\u003e\nCustom layer example\n\u003c/summary\u003e\n\nThis layer would add a `power` layer to OpenMapTiles output with power lines:\n\n```java\npackage org.openmaptiles.addons;\n\nimport com.onthegomap.planetiler.FeatureCollector;\nimport com.onthegomap.planetiler.reader.SourceFeature;\nimport org.openmaptiles.Layer;\nimport org.openmaptiles.OpenMapTilesProfile;\n\npublic class Power implements Layer, OpenMapTilesProfile.OsmAllProcessor {\n\n  private static final String LAYER_NAME = \"power\";\n\n  @Override\n  public String name() {\n    return LAYER_NAME;\n  }\n\n  @Override\n  public void processAllOsm(SourceFeature feature, FeatureCollector features) {\n    if (feature.canBeLine() \u0026\u0026 feature.hasTag(\"power\", \"line\")) {\n      features.line(\"power\")\n          .setBufferPixels(4)\n          .setMinZoom(6)\n          .setAttr(\"class\", \"line\");\n    }\n  }\n}\n```\n\n\u003c/details\u003e\n\nIf you think your custom layer or change to a built-in layer might be useful to others, consider opening a pull request\nto contribute it back to this repo. Any change that diverges from what is produced\nby https://github.com/openmaptiles/openmaptiles should be disabled by default, and enabled through a command-line\nargument that users can opt-into. For example, see how\nthe [building layer](src/main/java/org/openmaptiles/layers/Building.java) exposes a `building_merge_z13` command-line\nargument to disable merging nearby buildings at z13.\n\n## Code Layout\n\n[Generate.java](src/main/java/org/openmaptiles/Generate.java) generates code in\nthe [generated](src/main/java/org/openmaptiles/generated) package from an OpenMapTiles tag in\nGitHub:\n\n- [OpenMapTilesSchema](src/main/java/org/openmaptiles/generated/OpenMapTilesSchema.java)\n  contains an interface for each layer with constants for the name, attributes, and allowed values for each tag in that\n  layer\n- [Tables](src/main/java/org/openmaptiles/generated/Tables.java)\n  contains a record for each table that OpenMapTiles [imposm3](https://github.com/omniscale/imposm3) configuration\n  generates (along with the tag-filtering expression) so layers can listen on instances of those records instead of\n  doing the tag filtering and parsing themselves\n\nThe [layers](src/main/java/org/openmaptiles/layers) package contains a port of the SQL logic to\ngenerate each layer from OpenMapTiles. Layers define how source features (or parsed imposm3 table rows) map to vector\ntile features, and logic for post-processing tile geometries.\n\n[OpenMapTilesProfile](src/main/java/org/openmaptiles/OpenMapTilesProfile.java) dispatches source\nfeatures to layer handlers and merges the results.\n\n[OpenMapTilesMain](src/main/java/org/openmaptiles/OpenMapTilesMain.java) is the main driver that\nregisters source data and output location.\n\n## Regenerating Code\n\nTo run `Generate.java`,\nuse [scripts/regenerate-openmaptiles.sh](https://github.com/openmaptiles/planetiler-openmaptiles/blob/main/scripts/regenerate-openmaptiles.sh)\nscript with the\nOpenMapTiles release tag:\n\n```bash\n./scripts/regenerate-openmaptiles.sh v3.16\n```\n\nThen follow the instructions it prints for reformatting generated code.\n\nIf you want to regenerate from a different repository than the default openmaptiles, you can specify the url like this:\n\n```bash\n./scripts/regenerate-openmaptiles.sh v3.16 https://raw.githubusercontent.com/openmaptiles/openmaptiles/\n```\n\n## License\n\nAll code in this repository is under the [BSD license](./LICENSE.md) and the cartography decisions encoded in the schema\nand 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\n**reference \"OpenMapTiles\"** with a link to https://openmaptiles.org/. Exceptions to attribution requirement can be granted\non 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%2Fplanetiler-openmaptiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmaptiles%2Fplanetiler-openmaptiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmaptiles%2Fplanetiler-openmaptiles/lists"}