Skip to content

Commit

Permalink
geonames-ww: Plot only countries with more than two cities
Browse files Browse the repository at this point in the history
  • Loading branch information
trixon committed Apr 12, 2020
1 parent cd80371 commit 35195ac
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,19 @@ private void refresh() {
int minValue = 0;
int maxValue = 100000;

for (Country country : countries) {
AnalyticGrid analyticGrid = new AnalyticGrid(mLayer, altitude, minValue, maxValue);
analyticGrid.setNullOpacity(0.0);
analyticGrid.setZeroOpacity(0.3);
analyticGrid.setZeroValueSearchRange(5);
analyticGrid.setGridData(getGridData(country));
countries.stream()
.filter(country -> (country.getGeonames().size() > 1))
.map(country -> {
AnalyticGrid analyticGrid = new AnalyticGrid(mLayer, altitude, minValue, maxValue);
analyticGrid.setNullOpacity(0.0);
analyticGrid.setZeroOpacity(0.3);
analyticGrid.setZeroValueSearchRange(5);
analyticGrid.setGridData(getGridData(country));

return analyticGrid;
}).forEachOrdered(analyticGrid -> {
mLayer.addRenderable(analyticGrid.getSurface());
}
});

LayerBundleManager.getInstance().redraw();
}
Expand Down

0 comments on commit 35195ac

Please sign in to comment.