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

add LandCover layer to Overture example #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michaelkirk
Copy link

Are you open to adding more layers into this Overture example?

I tried to start small, since it's my first PR.

Also, I haven't written much Java, so let me know if I've done something dumb.

@Override
public void processFeature(SourceFeature sourceFeature, FeatureCollector features) {
var cartography = sourceFeature.getStruct("cartography");
var minZoom = cartography.get("min_zoom").asInt();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was taken from the existing OvertureLandcover example.

@Override
public List<Feature> postProcess(int zoom, List<Feature> items) throws GeometryException {
double minSize = zoom < 13 ? 8 : config.minFeatureSize(zoom);
items = FeatureMerge.mergeOverlappingPolygons(items, minSize);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not in the existing OvertureLandcover example, but I thought it seemed like a good idea. What do you think?

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

Successfully merging this pull request may close these issues.

1 participant