Skip to content

Commit

Permalink
fix point min size handling
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Nov 27, 2024
1 parent a12141f commit b3e3701
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,10 @@ Partial withAttr(String key, Object value) {
return rangesWithGeometries;
}

public SourceFeature source() {
return source;
}


/**
* A builder that can be used to configure linear-scoped attributes for a partial segment of a line feature.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ public void accept(FeatureCollector.Feature feature) {
} else {
if (minSize > 0) {
if (geometry instanceof Puntal) {
double size = feature.getSourceFeaturePixelSizeAtZoom(zoom);
if (size > 0 && size < minSize) {
// don't emit points if the source feature it came from was too small
continue;
if (!feature.source().isPoint()) {
double size = feature.getSourceFeaturePixelSizeAtZoom(zoom);
if (size < minSize) {
// don't emit points if the source feature it came from was too small
continue;
}
}
} else if (simpleLineLength >= 0 && simpleLineLength * scale * 256 < minSize) {
// skip processing lines that are too short
Expand Down

0 comments on commit b3e3701

Please sign in to comment.