use of com.revolsys.swing.map.layer.elevation.gridded.GriddedElevationModelZRange in project com.revolsys.open by revolsys.
the class RasterizerGriddedElevationModelLayerRenderer method setRasterizer.
public void setRasterizer(final GriddedElevationModelRasterizer rasterizer) {
if (rasterizer != null) {
this.rasterizer = rasterizer;
final String iconName = rasterizer.getIconName();
setIcon(iconName);
final LayerRenderer<?> parent = getParent();
if (parent instanceof GriddedElevationModelZRange) {
final GriddedElevationModelZRange zRange = (GriddedElevationModelZRange) parent;
if (!Double.isFinite(rasterizer.getMinZ())) {
final double minZ = zRange.getMinZ();
rasterizer.setMinZ(minZ);
}
if (!Double.isFinite(rasterizer.getMaxZ())) {
final double maxZ = zRange.getMaxZ();
rasterizer.setMaxZ(maxZ);
}
}
final GriddedElevationModel elevationModel = getElevationModel();
if (elevationModel == null) {
rasterizer.updateValues();
} else {
rasterizer.setElevationModel(elevationModel);
}
}
this.redraw = true;
}
Aggregations