Replies: 1 comment
-
You can add a geojson source to a java profile with something like: Planetiler.create(args)
setProfile(profile)
.addGeoJsonSource("mygeojson", Path.of("path", "to", "file.json"))
.run() Then in your profile's In yaml, you can add a geojson source: sources:
mygeojson:
type: geojson
local_path: "path/to/file.json" then use it in a layer definition: layers:
- id: water
features:
- source: mygeojson
geometry: polygon
include_when:
natural: water
attributes:
- key: natural
- key: intermittent The default openmaptiles profile is too complex for yaml config so is implemented in Java in https://github.com/openmaptiles/planetiler-openmaptiles. There's not currently a way to combine a java profile and yaml in a single run, so for now you'll need to produce 2 separate mbtiles/pmtiles files. |
Beta Was this translation helpful? Give feedback.
-
Is there any place to find documentation or info on the new geojson support and how to add a geojson layer to existing OSM build, or do completely new build with multiple geojson layers only? Also, any good examples of how to go further and control specific layer settings like min/max zoom levels, included/excluded properties, etc. with teh yaml config file? Is there a sample yaml file that matches the default full world build of the example command line that could be used as a starting point to add/modify? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions