Skip to content

Commit

Permalink
Avoid variable shadowing in house number code (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
wipfli authored Feb 24, 2025
1 parent 7b5b22d commit 450155a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tiles/src/main/java/com/protomaps/basemap/layers/Buildings.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ public void processOsm(SourceFeature sf, FeatureCollector features) {
}

if (sf.hasTag("addr:housenumber")) {
FeatureCollector.Feature feature = null;
FeatureCollector.Feature housenumberFeature = null;
if (sf.isPoint()) {
feature = features.point(this.name());
housenumberFeature = features.point(this.name());
} else if (sf.canBePolygon()) {
feature = features.centroid(this.name());
housenumberFeature = features.centroid(this.name());
}
if (feature != null) {
feature
if (housenumberFeature != null) {
housenumberFeature
.setId(FeatureId.create(sf))
.setAttr("addr_housenumber", sf.getString("addr:housenumber"))
.setAttr("addr_street", sf.getString("addr:street"))
Expand Down

0 comments on commit 450155a

Please # to comment.