Skip to content

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