2022-07-28 10:52:17 +02:00
2022-06-08 18:07:55 +02:00
2022-07-28 10:52:17 +02:00
2022-06-06 15:02:57 +02:00
2022-07-28 10:52:17 +02:00

Planetiler OpenMapTiles Profile

This OpenMapTiles profile is based on OpenMapTiles. See README.md in the parent repository for instructions on how to run.

Differences from OpenMapTiles

  • Road name abbreviations are not implemented yet in the transportation_name layer
  • agg_stop tag not implemented yet in the poi layer
  • brunnel tag is excluded from transportation_name layer to avoid breaking apart long transportation_name lines, to revert this behavior set --transportation-name-brunnel=true
  • rank field on mountain_peak linestrings only has 3 levels (1: has wikipedia page and name, 2: has name, 3: no name or wikipedia page or name)

Code Layout

Generate.java generates code in the generated package from an OpenMapTiles tag in GitHub:

  • OpenMapTilesSchema contains an interface for each layer with constants for the name, attributes, and allowed values for each tag in that layer
  • Tables contains a record for each table that OpenMapTiles imposm3 configuration generates (along with the tag-filtering expression) so layers can listen on instances of those records instead of doing the tag filtering and parsing themselves

The layers package contains a port of the SQL logic to generate each layer from OpenMapTiles. Layers define how source features (or parsed imposm3 table rows) map to vector tile features, and logic for post-processing tile geometries.

OpenMapTilesProfile dispatches source features to layer handlers and merges the results.

OpenMapTilesMain is the main driver that registers source data and output location.

Regenerating Code

To run Generate.java, use scripts/regenerate-openmaptiles.sh script with the OpenMapTiles release tag:

./scripts/regenerate-openmaptiles.sh v3.13.1

Then follow the instructions it prints for reformatting generated code.

If you want to regenerate from a different repository than the default openmaptiles, you can specify the url like this:

./scripts/regenerate-openmaptiles.sh v3.13.1 https://raw.githubusercontent.com/openmaptiles/openmaptiles/

License

All code in this repository is under the BSD license and the cartography decisions encoded in the schema and SQL are licensed under CC-BY.

Products 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.

For a browsable electronic map based on OpenMapTiles and OpenStreetMap data, the credit should appear in the corner of the map. For example:

© OpenMapTiles © OpenStreetMap contributors

For printed and static maps a similar attribution should be made in a textual description near the image, in the same fashion as if you cite a photograph.

Description
No description provided
Readme 788 KiB
Languages
Java 99.7%
Shell 0.3%