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 newRasterModelHeightProviderinstance, based on the supplied settings.voidclose()protected voidfinalize()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
-
Builder
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein 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 isnullor 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'sreference 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 newRasterModelHeightProviderinstance, based on the supplied settings.If mandatory settings were not set, an exception is thrown.
- Returns:
- a new
RasterModelHeightProviderinstance. - Throws:
IllegalStateException- if therasterModelmethod has not been called.
-