Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Combine default OSM schema with custom yml #1148

Open
spatialillusions opened this issue Jan 16, 2025 · 2 comments
Open

[FEATURE] Combine default OSM schema with custom yml #1148

spatialillusions opened this issue Jan 16, 2025 · 2 comments

Comments

@spatialillusions
Copy link

spatialillusions commented Jan 16, 2025

Is your feature request related to a problem?
I really like the default maptiler schema that is generated, and I am aware of the possibility to modify the build and create a custom schema. I have also created custom schemas in yml files and built them successfully.
What I would like to do however is to add a single layer to the default schema. I tried to just add the --schema argument without "generate-custom" but that just resulted in the ordinary build without my additional layer.

The reason I would like to be able to do it in this way is so that it is possible to simply use the latest release with all the latest updates, without having to worry about keeping my changes in sync whit the main project.

Describe the solution you'd like
Providing both --osm-path and --schema arguments should build the default schema with the custom schema added.

Describe alternatives you've considered
The alternative is that I create a custom build and have to update it to keep in sync with the repository. But simply being able to use the official releases would be much simpler, and if others would like to do the same build as me, they would just need my yml file and additional data.

(I'm trying to add a contour lines layer.)

@msbarry
Copy link
Contributor

msbarry commented Jan 16, 2025

Hello! There is not currently a way to combine 2 profiles in a single run. It would be pretty trivial to support combining the layer/feature definitions from 2 or more profiles while processing each source, but I'm not exactly sure what the best way to merge other properties like the source definitions? For example the OMT profile might load natural earth from a source URL with one name, but yaml profile might load it from a different URL with different name, and ideally you'd like them to read from the same source. Any thoughts on that?

Also for contour lines if you're using maplibre-gl-js, check out https://github.com/onthegomap/maplibre-contour. I started adding contour lines to planetiler, then realized it would make more sense to do in the client so ported the approach to js instead.

@spatialillusions
Copy link
Author

Long story short, contour lines is just one thing I would like to do.

Use cases: (that I realize might not be the most common, but this is what I do)

  1. Uses maplibre, but everything is offline on a stand-alone computer, and I read all map data from a PMTILES file. To limit the number of files that the user needs to select on disc, I would like to have all my data in one file.

  2. Uses the data in ArcGIS Pro after I have converted the mbtiles output to a VTPK file. (Have a python script that does this that I will release once it is a bit more stable.) VTPK files uses mapbox styles and sort of ish vector tiles internally, so conversion is quite straightforward. The limitation in VTPK files is that you can only have once source, so if I want to display the contours above landuse but below roads, I will have to have all data in one vector tile.

Like I mentioned, my use cases might not be that common, so I might have to do a custom build to solve them. Just wanted to check that I hadn't done anything obvious wrong.
But still would be awesome to merge in custom layers, even if the user had to make sure to point to the right data paths themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants