Skip to content

Commit

Permalink
first sub-class search for agg_stop simplified a little
Browse files Browse the repository at this point in the history
  • Loading branch information
phanecak-maptiler committed Nov 3, 2023
1 parent 43d16a9 commit 269575b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/openmaptiles/layers/Poi.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public void finish(String sourceName, FeatureCollector.Factory featureCollectors
}
try {
// find first based on subclass
var firstSubclass = aggStopSet.stream().sorted(BY_SUBCLASS).toArray(Tables.OsmPoiPoint[]::new)[0].subclass();
var firstSubclass = aggStopSet.stream().min(BY_SUBCLASS).get().subclass();
var topAggStops =
aggStopSet.stream().filter(s -> firstSubclass.equals(s.subclass())).toArray(Tables.OsmPoiPoint[]::new);
if (topAggStops.length <= 2) {
Expand Down

0 comments on commit 269575b

Please sign in to comment.