marble
MergedLayerDecorator.cpp
Go to the documentation of this file.
52 void renderGroundOverlays( QImage *tileImage, const QVector<QSharedPointer<TextureTile> > &tiles ) const;
57 QVector<const GeoSceneTextureTile *> findRelevantTextureLayers( const TileId &stackedTileId ) const;
99 void MergedLayerDecorator::setTextureLayers( const QVector<const GeoSceneTextureTile *> &textureLayers )
116 void MergedLayerDecorator::updateGroundOverlays(const QList<const GeoDataGroundOverlay *> &groundOverlays )
164 StackedTile *MergedLayerDecorator::Private::createTile( const QVector<QSharedPointer<TextureTile> > &tiles ) const
176 const bool withConversion = tiles.count() > 1 || m_showSunShading || m_showTileId || !m_groundOverlays.isEmpty();
216 void MergedLayerDecorator::Private::renderGroundOverlays( QImage *tileImage, const QVector<QSharedPointer<TextureTile> > &tiles ) const
222 GeoDataLatLonBox tileLatLonBox = tileId.toLatLonBox( findRelevantTextureLayers( tileId ).first() );
263 if ( overlayLatLonBox.west() > 0 && overlayLatLonBox.east() > 0 && overlayLatLonBox.west() > overlayLatLonBox.east() && lon > 0 && lon < overlayLatLonBox.west() ) {
264 if ( ! ( lon < overlayLatLonBox.west() && lon > overlayLatLonBox.toCircumscribedRectangle().west() ) ) {
270 qreal rotatedLon = ( lon - centerLon ) * cosRotation - ( lat - centerLat ) * sinRotation + centerLon;
271 qreal rotatedLat = ( lon - centerLon ) * sinRotation + ( lat - centerLat ) * cosRotation + centerLat;
277 qreal px = ( GeoDataLatLonBox( 0, 0, rotatedLon, overlayLatLonBox.west() ).width() * lonToPixel );
278 qreal py = qreal( overlay->icon().height() ) - ( GeoDataLatLonBox( rotatedLat, overlayLatLonBox.south(), 0, 0 ).height() * latToPixel ) - 1;
291 const QVector<const GeoSceneTextureTile *> textureLayers = d->findRelevantTextureLayers( stackedTileId );
298 mDebug() << Q_FUNC_INFO << layer->sourceDir() << tileId << layer->tileSize() << layer->fileFormat();
306 const GeoSceneTextureTile *const textureLayer = static_cast<const GeoSceneTextureTile *>( layer );
307 const QImage tileImage = d->m_tileLoader->loadTileImage( textureLayer, tileId, DownloadBrowse );
324 const QVector<const GeoSceneTextureTile *> textureLayers = d->findRelevantTextureLayers( stackedTileId );
347 StackedTile *MergedLayerDecorator::updateTile( const StackedTile &stackedTile, const TileId &tileId, const QImage &tileImage )
371 if ( TileLoader::tileStatus( textureLayer, id ) != TileLoader::Available || usage == DownloadBrowse ) {
402 void MergedLayerDecorator::Private::paintSunShading( QImage *tileImage, const TileId &id ) const
555 QVector<const GeoSceneTextureTile *> MergedLayerDecorator::Private::findRelevantTextureLayers( const TileId &stackedTileId ) const
uchar * scanLine(int i)
Rendering is based on no or partial data, more data was requested (e.g. pending network queries) ...
Definition: MarbleGlobal.h:194
void interpolate(MarbleWidget *widget, qreal value)
Definition: examples/cpp/animation-video/main.cpp:68
bool showCityLights() const
Definition: MergedLayerDecorator.cpp:392
qreal height(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the height of the latitude interval.
Definition: GeoDataLatLonBox.cpp:255
bool showSunShading() const
Definition: MergedLayerDecorator.cpp:382
Definition: BlendingFactory.h:28
qreal width(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the width of the longitude interval.
Definition: GeoDataLatLonBox.cpp:236
void setShowSunShading(bool show)
Definition: MergedLayerDecorator.cpp:377
Definition: Blending.h:25
void append(const T &value)
virtual void blend(QImage *const bottom, TextureTile const *const top) const =0
static uint pixelF(const QImage &image, qreal x, qreal y)
Returns the color value of the result tile at a given floating point position.
Definition: ImageF.cpp:18
A class that resembles an image tile (extends Tile).
Definition: TextureTile.h:60
static TileStatus tileStatus(GeoSceneTiled const *textureLayer, const TileId &tileId)
Returns the status of the downloaded tile file:
Definition: TileLoader.cpp:191
static qreal normalizeLon(qreal lon, GeoDataCoordinates::Unit=GeoDataCoordinates::Radian)
normalize the longitude to always be -M_PI <= lon <= +M_PI (Radian).
Definition: GeoDataCoordinates.cpp:776
static int maximumTileLevel(GeoSceneTiled const &texture)
Definition: TileLoader.cpp:138
GeoSceneTextureTile::Projection tileProjection() const
Definition: MergedLayerDecorator.cpp:150
int depth() const
QString fileFormat() const
Definition: GeoSceneAbstractDataset.cpp:43
int levelZeroColumns() const
Definition: GeoSceneTiled.cpp:97
Definition: GeoSceneTiled.h:43
Browsing mode, normal operation of Marble, like a web browser.
Definition: MarbleGlobal.h:166
bool isNull() const
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
void addText(const QPointF &point, const QFont &font, const QString &text)
virtual bool contains(const GeoDataCoordinates &) const
Definition: GeoDataLatLonBox.cpp:309
void setNamedColor(const QString &name)
GeoDataLatLonBox & latLonBox() const
Definition: GeoDataGroundOverlay.cpp:97
void setTextureLayers(const QVector< const GeoSceneTextureTile * > &textureLayers)
Definition: MergedLayerDecorator.cpp:99
int maximumTileLevel() const
Definition: GeoSceneTiled.cpp:117
A single tile that consists of a stack of Tile layers.
Definition: StackedTile.h:56
QSize tileSize() const
Definition: MergedLayerDecorator.cpp:157
void updateGroundOverlays(const QList< const GeoDataGroundOverlay * > &groundOverlays)
Definition: MergedLayerDecorator.cpp:116
QString name() const
Definition: GeoSceneAbstractDataset.cpp:38
qreal north(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the northern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:93
virtual ~MergedLayerDecorator()
Definition: MergedLayerDecorator.cpp:94
qreal east(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the eastern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:135
Definition: TileLoader.h:51
Definition: SunLocator.h:33
int width() const
int textureLayersSize() const
Definition: MergedLayerDecorator.cpp:122
int tileRowCount(int level) const
Definition: MergedLayerDecorator.cpp:141
int maximumTileLevel() const
Returns the highest level in which some tiles are theoretically available for the current texture lay...
Definition: MergedLayerDecorator.cpp:127
Definition: TileLoader.h:50
virtual bool intersects(const GeoDataLatLonBox &) const
Definition: GeoDataLatLonBox.cpp:385
bool isEmpty() const
qreal rotation(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the rotation of the bounding box.
Definition: GeoDataLatLonBox.cpp:190
static void normalizeLonLat(qreal &lon, qreal &lat, GeoDataCoordinates::Unit=GeoDataCoordinates::Radian)
normalize both longitude and latitude at the same time This method normalizes both latitude and longi...
Definition: GeoDataCoordinates.cpp:845
Definition: RenderState.h:22
virtual GeoDataCoordinates center() const
returns the center of this box
Definition: GeoDataLatLonBox.cpp:276
GeoDataLatLonBox toLatLonBox(const GeoSceneTiled *textureLayer) const
Definition: TileId.cpp:36
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
bool crossesDateLine() const
Detect whether the bounding box crosses the IDL.
Definition: GeoDataLatLonBox.cpp:266
int tileColumnCount(int level) const
Definition: MergedLayerDecorator.cpp:132
GeoDataLatLonBox toCircumscribedRectangle() const
Definition: GeoDataLatLonBox.cpp:506
StackedTile * updateTile(const StackedTile &stackedTile, const TileId &tileId, const QImage &tileImage)
Definition: MergedLayerDecorator.cpp:347
qreal west(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the western boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:156
const T & at(int i) const
Definition: TileId.h:27
bool hasMaximumTileLevel() const
Definition: GeoSceneTiled.h:125
MARBLE_EXPORT int levelToRow(int levelZeroRows, int level)
Get the maximum number of tile rows for a given tile level.
Definition: TileLoaderHelper.cpp:36
bool isEmpty() const
StackedTile * loadTile(const TileId &id)
Definition: MergedLayerDecorator.cpp:289
qreal south(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the southern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:114
int count(const T &value) const
Definition: TileLoader.h:52
MARBLE_EXPORT int levelToColumn(int levelZeroColumns, int level)
Get the maximum number of tile columns for a given tile level.
Definition: TileLoaderHelper.cpp:46
Rendering is based on complete, but outdated data, data update was requested.
Definition: MarbleGlobal.h:193
int height() const
void setShowCityLights(bool show)
Definition: MergedLayerDecorator.cpp:387
void downloadStackedTile(const TileId &id, DownloadUsage usage)
Definition: MergedLayerDecorator.cpp:366
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QVector< QSharedPointer< TextureTile > > tiles() const
Returns the stack of Tiles.
Definition: StackedTile.cpp:257
void setShowTileId(bool show)
Definition: MergedLayerDecorator.cpp:397
RenderState renderState(const TileId &stackedTileId) const
Definition: MergedLayerDecorator.cpp:318
A class that defines a 2D bounding box for geographic data.
Definition: GeoDataLatLonBox.h:51
Definition: TileLoader.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.