29#include <QDomDocument>
35#include <QRegularExpression>
38const int QgsPalettedRasterRenderer::MAX_FLOAT_CLASSES = 65536;
46 MultiValueClassData::iterator it = std::find_if( mMultiValueClassData.begin(), mMultiValueClassData.end(), [&klass](
const MultiValueClass & val ) ->
bool
48 return val.label == klass.label && val.color == klass.color ;
50 if ( it != mMultiValueClassData.end() )
52 it->values.push_back( klass.value );
65 , mMultiValueClassData( classes )
73 std::unique_ptr< QgsPalettedRasterRenderer > renderer = std::make_unique< QgsPalettedRasterRenderer >(
nullptr, mBand, mMultiValueClassData );
75 if ( mSourceColorRamp )
76 renderer->setSourceColorRamp( mSourceColorRamp->clone() );
78 renderer->copyCommonProperties(
this );
80 return renderer.release();
95 const int bandNumber = elem.attribute( QStringLiteral(
"band" ), QStringLiteral(
"-1" ) ).toInt();
98 const QDomElement paletteElem = elem.firstChildElement( QStringLiteral(
"colorPalette" ) );
99 if ( !paletteElem.isNull() )
101 const QDomNodeList paletteEntries = paletteElem.elementsByTagName( QStringLiteral(
"paletteEntry" ) );
103 QDomElement entryElem;
106 for (
int i = 0; i < paletteEntries.size(); ++i )
110 entryElem = paletteEntries.at( i ).toElement();
111 value = entryElem.attribute( QStringLiteral(
"value" ), QStringLiteral(
"0" ) ).toDouble();
112 color = QColor( entryElem.attribute( QStringLiteral(
"color" ), QStringLiteral(
"#000000" ) ) );
113 color.setAlpha( entryElem.attribute( QStringLiteral(
"alpha" ), QStringLiteral(
"255" ) ).toInt() );
114 label = entryElem.attribute( QStringLiteral(
"label" ) );
115 QgsDebugMsgLevel( QStringLiteral(
"Value: %1, label: %2, color: %3" ).arg( value ).arg(
label, entryElem.attribute( QStringLiteral(
"color" ) ) ), 4 );
124 QDomElement sourceColorRampElem = elem.firstChildElement( QStringLiteral(
"colorramp" ) );
125 if ( !sourceColorRampElem.isNull() && sourceColorRampElem.attribute( QStringLiteral(
"name" ) ) == QLatin1String(
"[source]" ) )
140 return mMultiValueClassData;
145 mMultiValueClassData =
classes;
151 if ( ! mMultiValueClassData.isEmpty() )
153 const auto constMClassData = mMultiValueClassData;
156 if (
c.values.contains( idx ) )
166 MultiValueClassData::iterator cMvIt = mMultiValueClassData.begin();
167 for ( ; cMvIt != mMultiValueClassData.end(); ++cMvIt )
169 if ( cMvIt->values.contains( idx ) )
171 cMvIt->label =
label;
199 std::unique_ptr< QgsRasterBlock > outputBlock(
new QgsRasterBlock() );
200 if ( !
mInput || mMultiValueClassData.isEmpty() )
202 return outputBlock.release();
205 const std::shared_ptr< QgsRasterBlock > inputBlock(
mInput->
block( mBand,
extent, width, height, feedback ) );
207 if ( !inputBlock || inputBlock->isEmpty() )
210 return outputBlock.release();
216 std::shared_ptr< QgsRasterBlock > alphaBlock;
221 if ( !alphaBlock || alphaBlock->isEmpty() )
223 return outputBlock.release();
228 alphaBlock = inputBlock;
233 return outputBlock.release();
240 Q_ASSERT( outputBlock );
241 unsigned int *outputData = (
unsigned int * )( outputBlock->bits() );
244 bool isNoData =
false;
245 for (
qgssize i = 0; i < rasterSize; ++i )
247 const double value = inputBlock->valueAndNoData( i, isNoData );
250 outputData[i] = myDefaultColor;
253 if ( !mColors.contains( value ) )
255 outputData[i] = myDefaultColor;
259 if ( !hasTransparency )
261 outputData[i] = mColors.value( value );
272 const double alpha = alphaBlock->value( i );
275 outputBlock->setColor( i, myDefaultColor );
280 currentOpacity *= alpha / 255.0;
284 const QRgb
c = mColors.value( value );
285 outputData[i] = qRgba( currentOpacity * qRed(
c ), currentOpacity * qGreen(
c ), currentOpacity * qBlue(
c ), currentOpacity * qAlpha(
c ) );
289 return outputBlock.release();
294 return mMultiValueClassData.size();
299 if ( parentElem.isNull() )
304 QDomElement rasterRendererElem = doc.createElement( QStringLiteral(
"rasterrenderer" ) );
307 rasterRendererElem.setAttribute( QStringLiteral(
"band" ), mBand );
308 QDomElement colorPaletteElem = doc.createElement( QStringLiteral(
"colorPalette" ) );
309 const ClassData klassData { classData() };
310 ClassData::const_iterator it = klassData.constBegin();
311 for ( ; it != klassData.constEnd(); ++it )
313 const QColor color = it->color;
314 QDomElement colorElem = doc.createElement( QStringLiteral(
"paletteEntry" ) );
315 colorElem.setAttribute( QStringLiteral(
"value" ), it->value );
316 colorElem.setAttribute( QStringLiteral(
"color" ), color.name() );
317 colorElem.setAttribute( QStringLiteral(
"alpha" ), color.alpha() );
318 if ( !it->label.isEmpty() )
320 colorElem.setAttribute( QStringLiteral(
"label" ), it->label );
322 colorPaletteElem.appendChild( colorElem );
324 rasterRendererElem.appendChild( colorPaletteElem );
327 if ( mSourceColorRamp )
330 rasterRendererElem.appendChild( colorRampElem );
333 parentElem.appendChild( rasterRendererElem );
342 const QDomNodeList elements = element.elementsByTagName( QStringLiteral(
"sld:RasterSymbolizer" ) );
343 if ( elements.size() == 0 )
347 QDomElement rasterSymbolizerElem = elements.at( 0 ).toElement();
350 QDomElement channelSelectionElem = doc.createElement( QStringLiteral(
"sld:ChannelSelection" ) );
351 rasterSymbolizerElem.appendChild( channelSelectionElem );
354 QDomElement channelElem = doc.createElement( QStringLiteral(
"sld:GrayChannel" ) );
355 channelSelectionElem.appendChild( channelElem );
358 QDomElement sourceChannelNameElem = doc.createElement( QStringLiteral(
"sld:SourceChannelName" ) );
359 sourceChannelNameElem.appendChild( doc.createTextNode( QString::number( mBand ) ) );
360 channelElem.appendChild( sourceChannelNameElem );
363 QDomElement colorMapElem = doc.createElement( QStringLiteral(
"sld:ColorMap" ) );
364 colorMapElem.setAttribute( QStringLiteral(
"type" ), QStringLiteral(
"values" ) );
365 if ( this->
classes().size() >= 255 )
366 colorMapElem.setAttribute( QStringLiteral(
"extended" ), QStringLiteral(
"true" ) );
367 rasterSymbolizerElem.appendChild( colorMapElem );
371 const QList<QgsPalettedRasterRenderer::Class>
classes = this->
classes();
372 QList<QgsPalettedRasterRenderer::Class>::const_iterator classDataIt =
classes.constBegin();
373 for ( ; classDataIt !=
classes.constEnd(); ++classDataIt )
375 QDomElement colorMapEntryElem = doc.createElement( QStringLiteral(
"sld:ColorMapEntry" ) );
376 colorMapElem.appendChild( colorMapEntryElem );
379 colorMapEntryElem.setAttribute( QStringLiteral(
"color" ), classDataIt->color.name() );
380 colorMapEntryElem.setAttribute( QStringLiteral(
"quantity" ), QString::number( classDataIt->value ) );
381 colorMapEntryElem.setAttribute( QStringLiteral(
"label" ), classDataIt->label );
382 if ( classDataIt->color.alphaF() != 1.0 )
384 colorMapEntryElem.setAttribute( QStringLiteral(
"opacity" ), QString::number( classDataIt->color.alphaF() ) );
391 if ( mSourceColorRamp )
403 QList< QPair< QString, QColor > > symbolItems;
406 QString lab { classData.label };
410 for (
const QVariant &val : std::as_const( classData.values ) )
414 const double numericValue { val.toDouble( &ok ) };
417 values.push_back( QLocale().toString( numericValue ) );
421 values.push_back( val.toString() );
424 lab = values.join( QChar(
' ' ) );
426 symbolItems << qMakePair( lab, classData.color );
434 QList<QgsLayerTreeModelLegendNode *> res;
437 if ( !name.isEmpty() )
443 res.reserve( res.size() + items.size() );
444 for (
const QPair< QString, QColor > &item : items )
465 mSourceColorRamp.reset( ramp );
470 return mSourceColorRamp.get();
475 QList<QgsColorRampShader::ColorRampItem>::const_iterator colorIt = table.constBegin();
477 for ( ; colorIt != table.constEnd(); ++colorIt )
486 if ( ! attributeTable || ! attributeTable->
isValid() )
493 const QList<QgsRasterAttributeTable::MinMaxClass> minMaxClasses { attributeTable->
minMaxClasses( classificationColumn ) };
494 if ( minMaxClasses.empty() )
499 QVector<QVariant> values;
500 for (
const double val : std::as_const( minMaxClass.minMaxValues ) )
502 values.push_back( QVariant( val ) );
504 classData.push_back( { values, minMaxClass.color, minMaxClass.name } );
507 int numClasses {
static_cast<int>( classData.count( ) ) };
510 if ( ramp && numClasses > 0 )
518 randomRamp->setTotalColorCount( numClasses );
521 if ( numClasses > 1 )
524 QgsPalettedRasterRenderer::MultiValueClassData::iterator cIt = classData.begin();
525 for ( ; cIt != classData.end(); ++cIt )
527 cIt->color = ramp->
color( i /
static_cast<double>( numClasses ) );
539 const thread_local QRegularExpression linePartRx( QStringLiteral(
"[\\s,:]+" ) );
541 const QStringList parts =
string.split(
'\n', Qt::SkipEmptyParts );
542 for (
const QString &part : parts )
544 const QStringList lineParts = part.split( linePartRx, Qt::SkipEmptyParts );
546 switch ( lineParts.count() )
550 const int value = lineParts.at( 0 ).toInt( &ok );
560 const int value = lineParts.at( 0 ).toInt( &ok );
564 const QColor
c( lineParts.at( 1 ) );
572 if ( lineParts.count() < 4 )
575 const int value = lineParts.at( 0 ).toInt( &ok );
580 const double r = lineParts.at( 1 ).toDouble( &rOk );
582 const double g = lineParts.at( 2 ).toDouble( &gOk );
584 const double b = lineParts.at( 3 ).toDouble( &bOk );
587 if ( rOk && gOk && bOk )
589 c = QColor( r, g, b );
592 if ( lineParts.count() >= 5 )
594 const double alpha = lineParts.at( 4 ).toDouble( &ok );
600 if ( lineParts.count() > 5 )
602 label = lineParts.mid( 5 ).join(
' ' );
616 QFile inputFile( path );
618 if ( inputFile.open( QIODevice::ReadOnly ) )
620 QTextStream in( &inputFile );
621 input = in.readAll();
632 std::sort( cd.begin(), cd.end(), [](
const Class & a,
const Class & b ) ->
bool
634 return a.value < b.value;
637 const auto constCd = cd;
638 for (
const Class &
c : constCd )
640 out << QStringLiteral(
"%1 %2 %3 %4 %5 %6" ).arg(
c.value ).arg(
c.color.red() )
641 .arg(
c.color.green() ).arg(
c.color.blue() ).arg(
c.color.alpha() ).arg(
c.label );
643 return out.join(
'\n' );
653 if ( bandNumber > 0 && bandNumber <= raster->
bandCount() )
655 qlonglong numClasses = 0;
669 std::set<double> values;
677 const int nbBlocksWidth =
static_cast< int >( std::ceil( 1.0 * raster->
xSize() / maxWidth ) );
678 const int nbBlocksHeight =
static_cast< int >( std::ceil( 1.0 * raster->
ySize() / maxHeight ) );
679 const int nbBlocks = nbBlocksWidth * nbBlocksHeight;
685 std::unique_ptr< QgsRasterBlock > rasterBlock;
687 bool isNoData =
false;
688 while ( iter.
readNextRasterPart( bandNumber, iterCols, iterRows, rasterBlock, iterLeft, iterTop, &blockExtent ) )
691 feedback->
setProgress( 100 * ( ( iterTop / maxHeight * nbBlocksWidth ) + iterLeft / maxWidth ) / nbBlocks );
696 for (
int row = 0; row < iterRows; row++ )
701 for (
int column = 0; column < iterCols; column++ )
706 const double currentValue = rasterBlock->valueAndNoData( row, column, isNoData );
707 if ( numClasses >= MAX_FLOAT_CLASSES )
709 QgsMessageLog::logMessage( QStringLiteral(
"Number of classes exceeded maximum (%1)." ).arg( MAX_FLOAT_CLASSES ), QStringLiteral(
"Raster" ) );
712 if ( !isNoData && values.find( currentValue ) == values.end() )
714 values.insert( currentValue );
715 data.push_back(
Class( currentValue, QColor(), QLocale().toString( currentValue ) ) );
722 std::sort( data.begin(), data.end(), [](
const Class & a,
const Class & b ) ->
bool
724 return a.value < b.value;
737 const int bins = std::ceil( max - min ) + 1;
755 data <<
Class( currentValue, QColor(), QLocale().toString( currentValue ) );
758 currentValue += interval;
769 if ( ramp && numClasses > 0 )
777 randomRamp->setTotalColorCount( data.count() );
780 if ( numClasses > 1 )
783 QgsPalettedRasterRenderer::ClassData::iterator cIt = data.begin();
784 for ( ; cIt != data.end(); ++cIt )
789 feedback->
setProgress( std::max<int>( 1, 100 * ( i + 1 ) / numClasses ) );
791 cIt->color = ramp->
color( i /
static_cast<double>( numClasses ) );
802 for (
const MultiValueClass &klass : std::as_const( mMultiValueClassData ) )
804 for (
const QVariant &entry : std::as_const( klass.values ) )
807 const double value { entry.toDouble( &ok )};
810 data.push_back( { value, klass.color, klass.label } );
814 QgsDebugMsgLevel( QStringLiteral(
"Could not convert class value '%1' to double when creating classes." ).arg( entry.toString() ), 2 );
821void QgsPalettedRasterRenderer::updateArrays()
825 MultiValueClassData::const_iterator it = mMultiValueClassData.constBegin();
826 for ( ; it != mMultiValueClassData.constEnd(); ++it )
828 for (
const QVariant &entry : std::as_const( it->values ) )
831 const double value { entry.toDouble( &ok )};
834 mColors[value] = qPremultiply( it->color.rgba() );
838 QgsDebugMsgLevel( QStringLiteral(
"Could not convert class value '%1' to double for color lookup." ).arg( entry.toString() ), 2 );
QFlags< RasterRendererFlag > RasterRendererFlags
Flags which control behavior of raster renderers.
@ InternalLayerOpacityHandling
The renderer internally handles the raster layer's opacity, so the default layer level opacity handli...
@ Float32
Thirty two bit floating point (float)
@ ARGB32_Premultiplied
Color, alpha, red, green, blue, 4 bytes the same as QImage::Format_ARGB32_Premultiplied.
@ Float64
Sixty four bit floating point (double)
Abstract base class for color ramps.
virtual QColor color(double value) const =0
Returns the color corresponding to a specified value.
bool isCanceled() const
Tells whether the operation has been canceled already.
void setProgress(double progress)
Sets the current progress for the feedback object.
Layer tree node points to a map layer.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
Properties of a multi value class: a class that contains multiple values.
QColor color
Color to render values.
MultiValueClass(const QVector< QVariant > &values, const QColor &color=QColor(), const QString &label=QString())
Constructor for MultiValueClass from a list of values.
Renderer for paletted raster images.
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override
Read block of data using given extent and size.
QList< QgsLayerTreeModelLegendNode * > createLegendNodes(QgsLayerTreeLayer *nodeLayer) override
Creates a set of legend nodes representing the renderer.
static QgsPalettedRasterRenderer::MultiValueClassData rasterAttributeTableToClassData(const QgsRasterAttributeTable *attributeTable, int classificationColumn=-1, QgsColorRamp *ramp=nullptr)
Reads and returns classes from the Raster Attribute Table attributeTable, optionally classifying the ...
QgsColorRamp * sourceColorRamp() const
Gets the source color ramp.
static QgsPalettedRasterRenderer::ClassData classDataFromString(const QString &string)
Converts a string containing a color table or class data to to paletted renderer class data.
QString label(double idx) const
Returns optional category label.
void setSourceColorRamp(QgsColorRamp *ramp)
Set the source color ramp.
QList< int > usesBands() const override
Returns a list of band numbers used by the renderer.
bool canCreateRasterAttributeTable() const override
Returns true if the renderer is suitable for attribute table creation.
void writeXml(QDomDocument &doc, QDomElement &parentElem) const override
Write base class members to xml.
Q_DECL_DEPRECATED int band() const
Returns the raster band used for rendering the raster.
QList< QgsPalettedRasterRenderer::Class > ClassData
Map of value to class properties.
bool accept(QgsStyleEntityVisitorInterface *visitor) const override
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
Qgis::RasterRendererFlags flags() const override
Returns flags which dictate renderer behavior.
int nColors() const
Returns number of colors.
QList< QgsPalettedRasterRenderer::MultiValueClass > MultiValueClassData
Map of multi value to class properties.
static QgsPalettedRasterRenderer::ClassData classDataFromFile(const QString &path)
Opens a color table file and returns corresponding paletted renderer class data.
bool setInputBand(int band) override
Attempts to set the input band for the renderer.
static QgsRasterRenderer * create(const QDomElement &elem, QgsRasterInterface *input)
void setMultiValueClasses(const MultiValueClassData &classes)
Sets the multi value classes to setMultiValueClasses.
static QgsPalettedRasterRenderer::ClassData colorTableToClassData(const QList< QgsColorRampShader::ColorRampItem > &table)
Converts a raster color table to paletted renderer class data.
ClassData classes() const
Returns a map of value to classes (colors) used by the renderer.
QList< QPair< QString, QColor > > legendSymbologyItems() const override
Returns symbology items if provided by renderer.
QgsPalettedRasterRenderer * clone() const override
Clone itself, create deep copy.
void setLabel(double idx, const QString &label)
Set category label.
static QgsPalettedRasterRenderer::ClassData classDataFromRaster(QgsRasterInterface *raster, int bandNumber, QgsColorRamp *ramp=nullptr, QgsRasterBlockFeedback *feedback=nullptr)
Generates class data from a raster, for the specified bandNumber.
int inputBand() const override
Returns the input band for the renderer, or -1 if no input band is available.
static QString classDataToString(const QgsPalettedRasterRenderer::ClassData &classes)
Converts classes to a string representation, using the .clr/gdal color table file format.
MultiValueClassData multiValueClasses() const
Returns a map of multi value to classes (colors) used by the renderer.
void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props=QVariantMap()) const override
Used from subclasses to create SLD Rule elements following SLD v1.0 specs.
QgsPalettedRasterRenderer(QgsRasterInterface *input, int bandNumber, const ClassData &classes)
Constructor for QgsPalettedRasterRenderer.
Totally random color ramp.
The Field class represents a Raster Attribute Table classification entry for a thematic Raster Attrib...
The QgsRasterAttributeTable class represents a Raster Attribute Table (RAT).
QList< QgsRasterAttributeTable::MinMaxClass > minMaxClasses(const int classificationColumn=-1) const
Returns the classes for a thematic Raster Attribute Table, classified by classificationColumn,...
bool isValid(QString *errorMessage=nullptr) const
Returns true if the Raster Attribute Table is valid, optionally reporting validity checks results in ...
The RasterBandStats struct is a container for statistics about a single raster band.
double minimumValue
The minimum cell value in the raster band.
double maximumValue
The maximum cell value in the raster band.
Feedback object tailored for raster block reading.
The QgsRasterHistogram is a container for histogram of a single raster band.
double minimum
The minimum histogram value.
double maximum
The maximum histogram value.
QgsRasterHistogram::HistogramVector histogramVector
Stores the histogram for a given layer.
bool valid
Histogram is valid.
int binCount
Number of bins (intervals,buckets) in histogram.
Base class for processing filters like renderers, reprojector, resampler etc.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)=0
Read block of data using given extent and size.
virtual Qgis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
virtual int xSize() const
Gets raster size.
Q_DECL_DEPRECATED QgsRasterBandStats bandStatistics(int bandNo, int stats, const QgsRectangle &extent=QgsRectangle(), int sampleSize=0, QgsRasterBlockFeedback *feedback=nullptr)
Returns the band statistics.
QString displayBandName(int bandNumber) const
Generates a friendly, descriptive name for the specified bandNumber.
QgsRasterInterface * mInput
virtual int ySize() const
virtual QgsRectangle extent() const
Gets the extent of the interface.
virtual QgsRasterInterface * input() const
Current input.
virtual QgsRasterHistogram histogram(int bandNo, int binCount=0, double minimum=std::numeric_limits< double >::quiet_NaN(), double maximum=std::numeric_limits< double >::quiet_NaN(), const QgsRectangle &extent=QgsRectangle(), int sampleSize=0, bool includeOutOfRange=false, QgsRasterBlockFeedback *feedback=nullptr)
Returns a band histogram.
Iterator for sequentially processing raster cells.
static const int DEFAULT_MAXIMUM_TILE_WIDTH
Default maximum tile width.
bool readNextRasterPart(int bandNumber, int &nCols, int &nRows, QgsRasterBlock **block, int &topLeftCol, int &topLeftRow)
Fetches next part of raster data, caller takes ownership of the block and caller should delete the bl...
static const int DEFAULT_MAXIMUM_TILE_HEIGHT
Default maximum tile height.
void startRasterRead(int bandNumber, qgssize nCols, qgssize nRows, const QgsRectangle &extent, QgsRasterBlockFeedback *feedback=nullptr)
Start reading of raster band.
Raster renderer pipe that applies colors to a raster.
double mOpacity
Global alpha value (0-1)
int mAlphaBand
Read alpha value from band.
QRgb renderColorForNodataPixel() const
Returns the color for the renderer to use to represent nodata pixels.
void _writeXml(QDomDocument &doc, QDomElement &rasterRendererElem) const
Write upper class info into rasterrenderer element (called by writeXml method of subclasses)
int bandCount() const override
Gets number of bands.
QgsRasterTransparency * mRasterTransparency
Raster transparency per color or value. Overwrites global alpha value.
bool usesTransparency() const
virtual void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props=QVariantMap()) const
Used from subclasses to create SLD Rule elements following SLD v1.0 specs.
void readXml(const QDomElement &rendererElem) override
Sets base class members from xml. Usually called from create() methods of subclasses.
Implementation of legend node interface for displaying raster legend entries.
double opacityForValue(double value) const
Returns the opacity (as a value from 0 to 1) for a single value pixel.
A rectangle specified with double values.
Implementation of legend node interface for displaying arbitrary label with icon.
A color ramp entity for QgsStyle databases.
An interface for classes which can visit style entity (e.g.
virtual bool visit(const QgsStyleEntityVisitorInterface::StyleLeaf &entity)
Called when the visitor will visit a style entity.
static QgsColorRamp * loadColorRamp(QDomElement &element)
Creates a color ramp from the settings encoded in an XML element.
static QDomElement saveColorRamp(const QString &name, QgsColorRamp *ramp, QDomDocument &doc)
Encodes a color ramp's settings to an XML element.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
unsigned long long qgssize
Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be har...
#define QgsDebugMsgLevel(str, level)
#define QgsDebugError(str)
Properties of a single value class.
Contains information relating to the style entity currently being visited.