use of com.revolsys.swing.map.layer.elevation.gridded.TiledGriddedElevationModelLayer in project com.revolsys.open by revolsys.
the class TiledMultipleGriddedElevationModelLayerRenderer method renderTile.
@Override
protected void renderTile(final Viewport2D viewport, final Cancellable cancellable, final TiledGriddedElevationModelLayerTile tile) {
final Graphics2D graphics = viewport.getGraphics();
if (graphics != null) {
final GriddedElevationModel elevationModel = tile.getElevationModel();
if (elevationModel != null) {
final TiledGriddedElevationModelLayer layer = getLayer();
final List<RasterizerGriddedElevationModelLayerRenderer> renderers = getRenderers();
for (final RasterizerGriddedElevationModelLayerRenderer renderer : cancellable.cancellable(renderers)) {
final long scaleForVisible = (long) viewport.getScaleForVisible();
if (renderer.isVisible(scaleForVisible)) {
renderer.setElevationModel(elevationModel);
renderer.render(viewport, cancellable, layer);
}
}
}
}
}
use of com.revolsys.swing.map.layer.elevation.gridded.TiledGriddedElevationModelLayer in project com.revolsys.open by revolsys.
the class TiledMultipleGriddedElevationModelLayerRenderer method updateBoundingBox.
public void updateBoundingBox() {
final TiledGriddedElevationModelLayer layer = getLayer();
if (layer != null) {
final BoundingBox boundingBox = layer.getBoundingBox();
final double minX = boundingBox.getMinX();
final double minY = boundingBox.getMinY();
final double maxX = boundingBox.getMaxX();
final double maxY = boundingBox.getMaxY();
final BoundingBox newBoundingBox = boundingBox.newBoundingBox(minX, minY, this.minZ, maxX, maxY, this.maxZ);
layer.setBoundingBox(newBoundingBox);
}
}
Aggregations