LuciadCPillar 2023.1.04
luciad::RasterModelHeightProvider::Builder Class Referencefinal

Builder for a RasterModelHeightProvider. More...

#include <luciad/models/rasters/RasterModelHeightProvider.h>

Public Member Functions

 Builder (Builder &&other) noexcept
 
 Builder (const Builder &other)
 
 ~Builder ()
 
RasterModelHeightProvider build ()
 Creates a new RasterModelHeightProvider instance, based on the supplied settings. More...
 
Builderinterpolate (bool interpolate)
 Set whether (bilinear) interpolation should be when converting the source elevation data to a height value. More...
 
Builderoperator= (Builder other) noexcept
 
BuilderrasterModel (std::shared_ptr< IRasterModel > model)
 Set the model from which the height provider needs to get elevation data. More...
 
Builderreference (std::shared_ptr< CoordinateReference > reference)
 Set the coordinate reference for the height provider. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ Builder() [1/2]

luciad::RasterModelHeightProvider::Builder::Builder ( const Builder other)

◆ Builder() [2/2]

luciad::RasterModelHeightProvider::Builder::Builder ( Builder &&  other)
noexcept

◆ ~Builder()

luciad::RasterModelHeightProvider::Builder::~Builder ( )

Member Function Documentation

◆ build()

RasterModelHeightProvider luciad::RasterModelHeightProvider::Builder::build ( )

Creates a new RasterModelHeightProvider instance, based on the supplied settings.

If mandatory settings were not set, an exception is thrown.

Returns
a new RasterModelHeightProvider instance.
Exceptions
luciad::LogicExceptionif the rasterModel method has not been called.

◆ interpolate()

Builder & luciad::RasterModelHeightProvider::Builder::interpolate ( bool  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
interpolatelinear interpolation is used if true, nearest neighbor if false.
Returns
this builder

◆ operator=()

Builder & luciad::RasterModelHeightProvider::Builder::operator= ( Builder  other)
noexcept

◆ rasterModel()

Builder & luciad::RasterModelHeightProvider::Builder::rasterModel ( std::shared_ptr< IRasterModel model)

Set the model from which the height provider needs to get elevation data.

This property is mandatory.

Parameters
modela raster model with elevation data
Returns
this builder
Exceptions
luciad::InvalidArgumentExceptionif model is nullptr or not an elevation raster model.

◆ reference()

Builder & luciad::RasterModelHeightProvider::Builder::reference ( std::shared_ptr< CoordinateReference reference)

Set the coordinate reference for the height provider.

This method is optional. If not called, the raster model's reference is used.

Parameters
referencethe coordinate reference to use
Returns
this builder
Exceptions
luciad::InvalidArgumentExceptionif reference is nullptr.