LuciadCPillar 2023.1.04
luciad::FeatureQueryConfiguration Class Referencefinal

The FeatureQueryConfiguration specifies which conditions to use for feature querying based on the map's current scale. More...

#include <luciad/layers/features/FeatureQueryConfiguration.h>

Classes

class  Builder
 Builder for the luciad::FeatureQueryConfiguration class. More...
 

Public Member Functions

 ~FeatureQueryConfiguration ()
 
std::optional< luciad::ExpressiongetCondition (size_t scaleLevel) const
 Returns the model query condition at a certain scale level, or std::nullopt if no condition is set for this scale level i.e. More...
 
const std::vector< MapScale > & getScaleBreaks () const
 Returns the scales at which the model query condition changes, ordered from zoomed out to zoomed in. More...
 
size_t getScaleLevelCount () const
 

Static Public Member Functions

static Builder newBuilder ()
 Returns a new builder for creating a FeatureQueryConfiguration. More...
 

Detailed Description

The FeatureQueryConfiguration specifies which conditions to use for feature querying based on the map's current scale.

Constructor & Destructor Documentation

◆ ~FeatureQueryConfiguration()

luciad::FeatureQueryConfiguration::~FeatureQueryConfiguration ( )

Member Function Documentation

◆ getCondition()

std::optional< luciad::Expression > luciad::FeatureQueryConfiguration::getCondition ( size_t  scaleLevel) const

Returns the model query condition at a certain scale level, or std::nullopt if no condition is set for this scale level i.e.

all features are selected.

Parameters
scaleLevelthe desired scale level to retrieve the condition for. This value must be smaller than the count returned by FeatureQueryConfiguration::getScaleLevelCount. If not, an exception is thrown.
Returns
the model query condition at a certain scale level, or std::nullopt if no condition is set for this scale level i.e. all features are selected.
See also
FeatureQueryConfiguration::getScaleLevelCount
Exceptions
luciad::InvalidArgumentExceptionIf scaleLevel parameter is greater or equal than the scale level count.
Since
2020.2

◆ getScaleBreaks()

const std::vector< MapScale > & luciad::FeatureQueryConfiguration::getScaleBreaks ( ) const

Returns the scales at which the model query condition changes, ordered from zoomed out to zoomed in.

This set contains every min or max scale that was passed to the builder through FeatureQueryConfiguration::Builder::addCondition once. The values MapScale::maxZoomedOut() or MapScale::maxZoomedIn() are an exception and will never be contained in this set, as these values are considered to be the bounds of valid scale values and therefore not an actual scale break.

Scale breaks define the borders of the defined scale levels. This means that there is one more scale level than there are scale breaks. Imagine for example that 3 scale levels were added:

  • [MaxZoomedOut, scaleBreak1] -> condition1
  • [scaleBreak1, scaleBreak2] -> condition2
  • [scaleBreak2, MaxZoomedIn] -> condition3

These 3 scale levels correspond with:

Returns
the scales at which the model query condition changes, ordered from zoomed out to zoomed in.

◆ getScaleLevelCount()

size_t luciad::FeatureQueryConfiguration::getScaleLevelCount ( ) const
Returns
the number of scale breaks + 1.
See also
FeatureQueryConfiguration::getCondition
Since
2020.2

◆ newBuilder()

static Builder luciad::FeatureQueryConfiguration::newBuilder ( )
static

Returns a new builder for creating a FeatureQueryConfiguration.

Returns
a new builder for creating a FeatureQueryConfiguration.