LuciadCPillar 2023.1.03
luciad::RasterLayer::Builder Class Referencefinal

Builder for creating a luciad::RasterLayer for a luciad::IRasterModel. More...

#include <luciad/layers/rasters/RasterLayer.h>

Public Member Functions

 Builder (Builder &&other) noexcept
 
 Builder (const Builder &other)
 
 ~Builder ()
 
std::shared_ptr< RasterLayerbuild () const
 Returns a new layer, based on the properties set on this builder. More...
 
BuilderdetailFactor (double factor)
 Sets the detail factor to use. More...
 
BuilderfillStyle (FillStyle fillStyle)
 Sets the fill style used when the raster data extent is shown when zoomed out far. More...
 
BuilderlineStyle (ComplexStrokeLineStyle lineStyle)
 Sets the line style used when the raster data extent is shown when zoomed out far. More...
 
BuilderlineStyle (LineStyle lineStyle)
 Sets the line style used when the raster data extent is shown when zoomed out far. More...
 
Buildermodel (std::shared_ptr< IRasterModel > model)
 Sets the raster model of the layer. More...
 
Builderoperator= (Builder other) noexcept
 
BuilderrasterStyle (RasterStyle rasterStyle)
 Sets the style for this raster. More...
 
Buildertitle (std::string title)
 Sets the title to use for the layer. More...
 
Buildervisible (bool visible)
 Sets whether the layer should be visible initially. More...
 

Detailed Description

Builder for creating a luciad::RasterLayer for a luciad::IRasterModel.

Styling color data

By default, color data is visualized using the image's own color model.

The raster values are only painted if the pixel density of the raster is not too high. Otherwise the bounds of the raster is painted instead. The style for painting the bounds of the raster data can be customized. You can find an example within this related article on basic raster styling.

Constructor & Destructor Documentation

◆ Builder() [1/2]

luciad::RasterLayer::Builder::Builder ( const Builder other)

◆ Builder() [2/2]

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

◆ ~Builder()

luciad::RasterLayer::Builder::~Builder ( )

Member Function Documentation

◆ build()

std::shared_ptr< RasterLayer > luciad::RasterLayer::Builder::build ( ) const

Returns a new layer, based on the properties set on this builder.

Returns
a new layer, based on the properties set on this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen the raster tile set structure is not supported.
luciad::LogicExceptionIf not all mandatory parameters are set.

◆ detailFactor()

Builder & luciad::RasterLayer::Builder::detailFactor ( double  factor)

Sets the detail factor to use.

The detail factor modifies the quality/detail of the loaded data.

Parameters
factorThe factor to apply.
A factor 1 means no change (default value).
A factor > 1 means more detail.
A factor < 1 means less detail.
Returns
this builder.
Exceptions
InvalidArgumentExceptionif the factor is not strictly positive.
Since
2020.1

◆ fillStyle()

Builder & luciad::RasterLayer::Builder::fillStyle ( FillStyle  fillStyle)

Sets the fill style used when the raster data extent is shown when zoomed out far.

Parameters
fillStylea fill style created with luciad::FillStyle::newBuilder.
Returns
this builder.
Since
2020.1

◆ lineStyle() [1/2]

Builder & luciad::RasterLayer::Builder::lineStyle ( ComplexStrokeLineStyle  lineStyle)

Sets the line style used when the raster data extent is shown when zoomed out far.

Only one line style can be set, if this function is called when a LineStyle has already been set, it will be overwritten.

Parameters
lineStylea complex stroke line style created with luciad::ComplexStrokeLineStyle::newBuilder.
Returns
this builder.
Since
2023.1

◆ lineStyle() [2/2]

Builder & luciad::RasterLayer::Builder::lineStyle ( LineStyle  lineStyle)

Sets the line style used when the raster data extent is shown when zoomed out far.

Only one line style can be set, if this function is called when a ComplexStrokeLineStyle has already been set, it will be overwritten.

Parameters
lineStylea line style created with luciad::LineStyle::newBuilder.
Returns
this builder.
Since
2020.1

◆ model()

Builder & luciad::RasterLayer::Builder::model ( std::shared_ptr< IRasterModel model)

Sets the raster model of the layer.

Calling this function is mandatory.

Parameters
modelthe raster model of the layer.
Returns
this builder.
Exceptions
NullArgumentExceptionif model is nullptr.

◆ operator=()

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

◆ rasterStyle()

Builder & luciad::RasterLayer::Builder::rasterStyle ( RasterStyle  rasterStyle)

Sets the style for this raster.

Parameters
rasterStylethe raster style to apply.
Returns
this builder.
Since
2023.1

◆ title()

Builder & luciad::RasterLayer::Builder::title ( std::string  title)

Sets the title to use for the layer.

If not set, the title from the ModelMetadata is used.

Parameters
titlethe title for the layer.
Returns
this builder.

◆ visible()

Builder & luciad::RasterLayer::Builder::visible ( bool  visible)

Sets whether the layer should be visible initially.

Default is true.

Parameters
visiblethe visibility.
Returns
this builder.