marble
MergedLayerDecorator.cpp
Go to the documentation of this file.
60 void renderGroundOverlays( QImage *tileImage, const QVector<QSharedPointer<TextureTile> > &tiles ) const;
65 QVector<const GeoSceneTextureTile *> findRelevantTextureLayers( const TileId &stackedTileId ) const;
107 void MergedLayerDecorator::setTextureLayers( const QVector<const GeoSceneTextureTile *> &textureLayers )
124 void MergedLayerDecorator::updateGroundOverlays(const QList<const GeoDataGroundOverlay *> &groundOverlays )
172 StackedTile *MergedLayerDecorator::Private::createTile( const QVector<QSharedPointer<TextureTile> > &tiles ) const
184 const bool withConversion = tiles.count() > 1 || m_showSunShading || m_showTileId || !m_groundOverlays.isEmpty();
224 void MergedLayerDecorator::Private::renderGroundOverlays( QImage *tileImage, const QVector<QSharedPointer<TextureTile> > &tiles ) const
230 GeoDataLatLonBox tileLatLonBox = tileId.toLatLonBox( findRelevantTextureLayers( tileId ).first() );
271 if ( overlayLatLonBox.west() > 0 && overlayLatLonBox.east() > 0 && overlayLatLonBox.west() > overlayLatLonBox.east() && lon > 0 && lon < overlayLatLonBox.west() ) {
272 if ( ! ( lon < overlayLatLonBox.west() && lon > overlayLatLonBox.toCircumscribedRectangle().west() ) ) {
278 qreal rotatedLon = ( lon - centerLon ) * cosRotation - ( lat - centerLat ) * sinRotation + centerLon;
279 qreal rotatedLat = ( lon - centerLon ) * sinRotation + ( lat - centerLat ) * cosRotation + centerLat;
285 qreal px = ( GeoDataLatLonBox( 0, 0, rotatedLon, overlayLatLonBox.west() ).width() * lonToPixel );
286 qreal py = qreal( overlay->icon().height() ) - ( GeoDataLatLonBox( rotatedLat, overlayLatLonBox.south(), 0, 0 ).height() * latToPixel ) - 1;
299 const QVector<const GeoSceneTextureTile *> textureLayers = d->findRelevantTextureLayers( stackedTileId );
306 mDebug() << Q_FUNC_INFO << layer->sourceDir() << tileId << layer->tileSize() << layer->fileFormat();
314 const GeoSceneTextureTile *const textureLayer = static_cast<const GeoSceneTextureTile *>( layer );
315 const QImage tileImage = d->m_tileLoader->loadTileImage( textureLayer, tileId, DownloadBrowse );
326 StackedTile *MergedLayerDecorator::updateTile( const StackedTile &stackedTile, const TileId &tileId, const QImage &tileImage )
350 if ( TileLoader::tileStatus( textureLayer, id ) != TileLoader::Available || usage == DownloadBrowse ) {
381 void MergedLayerDecorator::Private::paintSunShading( QImage *tileImage, const TileId &id ) const
534 QVector<const GeoSceneTextureTile *> MergedLayerDecorator::Private::findRelevantTextureLayers( const TileId &stackedTileId ) const
void interpolate(MarbleWidget *widget, qreal value)
Definition: examples/cpp/animation-video/main.cpp:68
bool showCityLights() const
Definition: MergedLayerDecorator.cpp:371
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:361
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:356
Definition: Blending.h:25
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:158
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:162
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
virtual bool contains(const GeoDataCoordinates &) const
Definition: GeoDataLatLonBox.cpp:309
GeoDataLatLonBox & latLonBox() const
Definition: GeoDataGroundOverlay.cpp:83
void setTextureLayers(const QVector< const GeoSceneTextureTile * > &textureLayers)
Definition: MergedLayerDecorator.cpp:107
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:165
void updateGroundOverlays(const QList< const GeoDataGroundOverlay * > &groundOverlays)
Definition: MergedLayerDecorator.cpp:124
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:102
qreal east(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the eastern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:135
Definition: SunLocator.h:33
int textureLayersSize() const
Definition: MergedLayerDecorator.cpp:130
int tileRowCount(int level) const
Definition: MergedLayerDecorator.cpp:149
int maximumTileLevel() const
Returns the highest level in which some tiles are theoretically available for the current texture lay...
Definition: MergedLayerDecorator.cpp:135
virtual bool intersects(const GeoDataLatLonBox &) const
Definition: GeoDataLatLonBox.cpp:385
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
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:140
GeoDataLatLonBox toCircumscribedRectangle() const
Definition: GeoDataLatLonBox.cpp:506
StackedTile * updateTile(const StackedTile &stackedTile, const TileId &tileId, const QImage &tileImage)
Definition: MergedLayerDecorator.cpp:326
qreal west(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the western boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:156
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
StackedTile * loadTile(const TileId &id)
Definition: MergedLayerDecorator.cpp:297
qreal south(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the southern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:114
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
void setShowCityLights(bool show)
Definition: MergedLayerDecorator.cpp:366
void downloadStackedTile(const TileId &id, DownloadUsage usage)
Definition: MergedLayerDecorator.cpp:345
QVector< QSharedPointer< TextureTile > > tiles() const
Returns the stack of Tiles.
Definition: StackedTile.cpp:257
void setShowTileId(bool show)
Definition: MergedLayerDecorator.cpp:376
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.