public static final class RasterModelHeightProvider.Builder extends Object implements AutoCloseable
Builder
for a RasterModelHeightProvider
.Constructor and Description |
---|
Builder(RasterModelHeightProvider.Builder other) |
Modifier and Type | Method and Description |
---|---|
RasterModelHeightProvider |
build()
Creates a new
RasterModelHeightProvider instance, based on the supplied settings. |
void |
close() |
protected void |
finalize() |
RasterModelHeightProvider.Builder |
interpolate(boolean interpolate)
Set whether (bilinear) interpolation should be when converting the source elevation data to a height value.
|
RasterModelHeightProvider.Builder |
rasterModel(IRasterModel model)
Set the model from which the height provider needs to get elevation data.
|
RasterModelHeightProvider.Builder |
reference(CoordinateReference reference)
Set the coordinate reference for the height provider.
|
public Builder(@NotNull RasterModelHeightProvider.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public RasterModelHeightProvider.Builder rasterModel(@NotNull IRasterModel model) throws IllegalArgumentException
This property is mandatory.
model
- a raster model with elevation dataIllegalArgumentException
- if model is null
or not an elevation raster model.@NotNull public RasterModelHeightProvider.Builder reference(@NotNull CoordinateReference reference) throws IllegalArgumentException
This method is optional. If not called, the raster model's
reference is used.
reference
- the coordinate reference to useIllegalArgumentException
- if reference is null
.@NotNull public RasterModelHeightProvider.Builder interpolate(boolean interpolate)
Using interpolation makes sure that neighbouring height values form a smoother curve. this is useful for visualization purposes, where a smooth result is often desired.
Disabling interpolation is useful when you want to get access to the original source elevation data.
This method is optional. Interpolation is disabled by default.
interpolate
- linear interpolation is used if true, nearest neighbor if false.@NotNull public RasterModelHeightProvider build() throws IllegalStateException
RasterModelHeightProvider
instance, based on the supplied settings.
If mandatory settings were not set, an exception is thrown.
RasterModelHeightProvider
instance.IllegalStateException
- if the rasterModel
method has not been called.