#include "MapToolsExamples.h"#include <terralib/common.h>#include <terralib/geometry.h>#include <terralib/dataaccess.h>#include <terralib/maptools.h>#include <terralib/raster.h>#include <terralib/se.h>#include <terralib/qt/widgets/canvas/Canvas.h>#include <cassert>#include <iostream>#include <memory>#include <vector>#include <string>#include <QApplication>#include <QDialog>#include <QLabel>Go to the source code of this file.
Variables | |
| bool | generatePNG = true |
| te::qt::widgets::Canvas* CreateCanvas | ( | te::map::DataSetLayer * | layer, |
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 58 of file RasterStyling.cpp.
References te::qt::widgets::Canvas::calcAspectRatio(), te::map::AbstractLayer::getExtent(), te::map::GetRaster(), te::qt::widgets::Canvas::setBackgroundColor(), te::qt::widgets::Canvas::setWindow(), and TE_OPAQUE.
Referenced by DrawRasterStyledLayers().
| te::map::DataSetLayer* CreateRasterLayer | ( | const std::string & | path | ) |
Definition at line 26 of file RasterStyling.cpp.
References te::common::Convert2String(), ds, G_ID, te::da::GetFirstPropertyPos(), te::common::Singleton< DataSourceManager >::getInstance(), and te::dt::RASTER_TYPE.
Referenced by DrawRasterStyledLayers().
| void DrawRasterStyledLayers | ( | ) |
It draws a set of raster layers using styles encoded using OGC RasterSymbology Enconding specification.
Definition at line 452 of file RasterStyling.cpp.
References CreateCanvas(), CreateRasterLayer(), te::map::GetRaster(), MONO_0_Style(), MONO_2_Style(), RGB_012_G_Contrast_Style(), RGB_012_RGB_Contrast_Style(), RGB_012_Transp_Style(), and RGB_102_Style().
Referenced by main().
| void MONO_0_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 347 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), te::se::GRAY_COMPOSITION, paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setColorCompositionType(), te::se::ChannelSelection::setGrayChannel(), te::se::RasterSymbolizer::setOpacity(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
Referenced by DrawRasterStyledLayers().
| void MONO_2_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 382 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), te::se::GRAY_COMPOSITION, paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setColorCompositionType(), te::se::ChannelSelection::setGrayChannel(), te::se::RasterSymbolizer::setOpacity(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
Referenced by DrawRasterStyledLayers().
| void paint | ( | te::qt::widgets::Canvas * | c, |
| bool | generatePNG, | ||
| std::string | fileName | ||
| ) |
Definition at line 94 of file RasterStyling.cpp.
References te::qt::widgets::Canvas::clear(), te::map::PNG, te::qt::widgets::Canvas::save(), and showPixmap().
Referenced by MONO_0_Style(), MONO_2_Style(), StarDelegate::paint(), te::qt::plugins::wfs::WFSItemDelegate::paint(), te::qt::plugins::wms::WMSItemDelegate::paint(), te::qt::widgets::CentralizedCheckBoxDelegate::paint(), EditDelegate::paint(), te::qt::plugins::st::STItemDelegate::paint(), te::qt::widgets::ThemeViewDelegate::paint(), te::qt::widgets::RasterLayerDelegate::paint(), te::ws::ogc::wms::qt::WMSItemDelegate::paint(), te::qt::widgets::HighlightDelegate::paint(), te::qt::widgets::LayerViewDelegate::paint(), RED_Style(), RGB_012_G_Contrast_Style(), RGB_012_RGB_Contrast_Style(), RGB_012_Style(), RGB_012_Transp_Style(), and RGB_102_Style().
| void RED_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 417 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::RED_COMPOSITION, te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setColorCompositionType(), te::se::RasterSymbolizer::setOpacity(), te::se::ChannelSelection::setRedChannel(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
| void RGB_012_G_Contrast_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 241 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::RGB_COMPOSITION, te::se::ChannelSelection::setBlueChannel(), te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setColorCompositionType(), te::se::SelectedChannel::setContrastEnhancement(), te::se::ContrastEnhancement::setGammaValue(), te::se::ChannelSelection::setGreenChannel(), te::se::RasterSymbolizer::setOpacity(), te::se::ChannelSelection::setRedChannel(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
Referenced by DrawRasterStyledLayers().
| void RGB_012_RGB_Contrast_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 290 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::RGB_COMPOSITION, te::se::ChannelSelection::setBlueChannel(), te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setColorCompositionType(), te::se::SelectedChannel::setContrastEnhancement(), te::se::ContrastEnhancement::setGammaValue(), te::se::ChannelSelection::setGreenChannel(), te::se::RasterSymbolizer::setOpacity(), te::se::ChannelSelection::setRedChannel(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
Referenced by DrawRasterStyledLayers().
| void RGB_012_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 107 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::ChannelSelection::setBlueChannel(), te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setGreenChannel(), te::se::RasterSymbolizer::setOpacity(), te::se::ChannelSelection::setRedChannel(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
| void RGB_012_Transp_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 151 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::RGB_COMPOSITION, te::se::ChannelSelection::setBlueChannel(), te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setColorCompositionType(), te::se::ChannelSelection::setGreenChannel(), te::se::RasterSymbolizer::setOpacity(), te::se::ChannelSelection::setRedChannel(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
Referenced by DrawRasterStyledLayers().
| void RGB_102_Style | ( | te::qt::widgets::Canvas * | c, |
| te::map::DataSetLayer * | l, | ||
| te::gm::Envelope * | e, | ||
| int | srid | ||
| ) |
Definition at line 196 of file RasterStyling.cpp.
References te::map::DataSetLayer::draw(), paint(), te::se::Style::push_back(), te::se::Rule::push_back(), te::se::RGB_COMPOSITION, te::se::ChannelSelection::setBlueChannel(), te::se::RasterSymbolizer::setChannelSelection(), te::se::ChannelSelection::setColorCompositionType(), te::se::ChannelSelection::setGreenChannel(), te::se::RasterSymbolizer::setOpacity(), te::se::ChannelSelection::setRedChannel(), te::se::SelectedChannel::setSourceChannelName(), and te::map::AbstractLayer::setStyle().
Referenced by DrawRasterStyledLayers().
| void showPixmap | ( | te::qt::widgets::Canvas * | c, |
| std::string | fileName | ||
| ) |
Definition at line 80 of file RasterStyling.cpp.
References te::qt::widgets::Canvas::getPixmap().
Referenced by paint().
| bool generatePNG = true |
Definition at line 24 of file RasterStyling.cpp.