Package com.luciad.models.rasters
Class RasterModelHeightProvider.Builder
java.lang.Object
com.luciad.models.rasters.RasterModelHeightProvider.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
RasterModelHeightProvider
Builder
for a RasterModelHeightProvider
.- Since:
- 2023.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a newRasterModelHeightProvider
instance, based on the supplied settings.void
close()
protected void
finalize()
interpolate
(boolean interpolate) Set whether (bilinear) interpolation should be when converting the source elevation data to a height value.rasterModel
(IRasterModel model) Set the model from which the height provider needs to get elevation data.reference
(CoordinateReference reference) Set the coordinate reference for the height provider.
-
Constructor Details
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
rasterModel
@NotNull public RasterModelHeightProvider.Builder rasterModel(@NotNull IRasterModel model) throws IllegalArgumentException Set the model from which the height provider needs to get elevation data.This property is mandatory.
- Parameters:
model
- a raster model with elevation data- Returns:
- this builder
- Throws:
IllegalArgumentException
- if model isnull
or not an elevation raster model.
-
reference
@NotNull public RasterModelHeightProvider.Builder reference(@NotNull CoordinateReference reference) throws IllegalArgumentException Set the coordinate reference for the height provider.This method is optional. If not called, the
raster model's
reference is used.- Parameters:
reference
- the coordinate reference to use- Returns:
- this builder
- Throws:
IllegalArgumentException
- if reference isnull
.
-
interpolate
Set whether (bilinear) interpolation should be when converting the source elevation data to a height value.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.
- Parameters:
interpolate
- linear interpolation is used if true, nearest neighbor if false.- Returns:
- this builder
-
build
Creates a newRasterModelHeightProvider
instance, based on the supplied settings.If mandatory settings were not set, an exception is thrown.
- Returns:
- a new
RasterModelHeightProvider
instance. - Throws:
IllegalStateException
- if therasterModel
method has not been called.
-