Skip to content

Commit

Permalink
duplicate houcenumber processing simplified further
Browse files Browse the repository at this point in the history
  • Loading branch information
phanecak-maptiler committed Dec 12, 2023
1 parent d756038 commit 08ee4da
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/org/openmaptiles/layers/Housenumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -147,11 +146,9 @@ public List<VectorTile.Feature> postProcess(int zoom, List<VectorTile.Feature> l
var items = list.stream()
.collect(Collectors.groupingBy(f -> f.attrs().get(TEMP_PARTITION)))
.values().stream()
.map(
g -> g.stream().min(BY_TEMP_HAS_NAME)
.flatMap(
g -> g.stream().min(BY_TEMP_HAS_NAME).stream()
)
.filter(Optional::isPresent)
.map(Optional::get)
.toList();

// remove temporary attributes
Expand Down

0 comments on commit 08ee4da

Please sign in to comment.