-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Declarative schema from configuration file #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Pushed a couple of minor changes and added #247 to track some followup tasks after this lands. I'll plan to merge a couple of other in-flight changes, put out a 0.5.0 release then land this PR.
planetiler-custommap/src/main/java/com/onthegomap/planetiler/custommap/ConfiguredProfile.java
Outdated
Show resolved
Hide resolved
Collection<String> sources, | ||
@JsonProperty("min_zoom") Integer minZoom, | ||
@JsonProperty("max_zoom") Integer maxZoom, | ||
GeometryType geometry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will we specify other geometry accessors like centroid eventually? Would that be a different value for geometry
? Or an additional flag so you can vary the source feature geometry type and accessor function separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be a flag or enumeration. A centroid is still a representation of an area IMO.
Add local_path to example test case
Kudos, SonarCloud Quality Gate passed! |
Hi everyone, I've understood that this PR is already integrated the main base code ? Do you know when a release will be compiled ? |
I think it is already released. Try something like the following:
|
Fixes #18
This PR provides the ability for a user to specify an arbitrary vector schema via a configuration file. Configuration is via a YML file which specifies the contents of the configured layers. Documentation for the schema definition format is provided in planetiler-custommap/README.md.
The schema language allows for the following features:
A collection of unit tests are provided, as well as a sample schema intended to support OWG vector tile exploration under openstreetmap/operations#565
A typical invocation looks something like:
This PR does not include handling for line merging, which needs a deeper investigation to deal with attributes that have minimum zooms greater than the overall feature minimum zoom, which would allow certain linestring features to merge only at certain lower zooms.