QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
terrain
qgsdemterraintileloader_p.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdemterraintileloader_p.h
3
--------------------------------------
4
Date : July 2017
5
Copyright : (C) 2017 by Martin Dobias
6
Email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSDEMTERRAINTILELOADER_P_H
17
#define QGSDEMTERRAINTILELOADER_P_H
18
20
21
//
22
// W A R N I N G
23
// -------------
24
//
25
// This file is not part of the QGIS API. It exists purely as an
26
// implementation detail. This header file may change from version to
27
// version without notice, or even be removed.
28
//
29
30
31
#include "
qgschunkloader.h
"
32
#include "
qgschunknode.h
"
33
#include "
qgscoordinatetransformcontext.h
"
34
#include "
qgsrectangle.h
"
35
#include "
qgstilingscheme.h
"
36
37
#include <QElapsedTimer>
38
#include <QFutureWatcher>
39
#include <QMutex>
40
41
#define SIP_NO_FILE
42
43
class
QgsRasterDataProvider
;
44
class
QgsRasterLayer
;
45
class
QgsRasterBlock
;
46
class
QgsCoordinateTransformContext
;
47
class
QgsTerrainGenerator
;
48
class
QgsTerrainDownloader
;
49
54
class
QgsDemHeightMapGenerator :
public
QObject
55
{
56
Q_OBJECT
57
public
:
62
QgsDemHeightMapGenerator( QgsRasterLayer *dtm,
const
QgsTilingScheme &tilingScheme,
int
resolution,
const
QgsCoordinateTransformContext &transformContext );
63
~QgsDemHeightMapGenerator()
override
;
64
66
QFuture<QByteArray> render(
const
QgsChunkNodeId &nodeId );
67
69
void
waitForFinished();
70
72
int
resolution()
const
{
return
mResolution; }
73
75
float
heightAt(
double
x,
double
y );
76
77
private
:
79
const
QgsRectangle mDtmExtent;
80
82
std::unique_ptr<QgsRasterDataProvider> mClonedProvider;
83
84
QgsTilingScheme mTilingScheme;
85
86
int
mResolution;
87
88
std::unique_ptr<QgsTerrainDownloader> mDownloader;
89
90
QHash<QFutureWatcher<QByteArray> *, QFuture<QByteArray>> mJobs;
91
92
void
lazyLoadDtmCoarseData(
int
res,
const
QgsRectangle &rect );
93
mutable
QMutex mLazyLoadDtmCoarseDataMutex;
95
std::unique_ptr<QgsRasterBlock> mDtmCoarseRasterBlock;
96
97
QgsCoordinateTransformContext mTransformContext;
98
};
99
101
102
#endif
// QGSDEMTERRAINTILELOADER_P_H
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition
qgscoordinatetransformcontext.h:61
QgsRasterBlock
Raster data container.
Definition
qgsrasterblock.h:42
QgsRasterDataProvider
Base class for raster data providers.
Definition
qgsrasterdataprovider.h:94
QgsRasterLayer
Represents a raster layer.
Definition
qgsrasterlayer.h:82
QgsTerrainDownloader
Takes care of downloading terrain data from a publicly available data source.
Definition
qgsterraindownloader.h:50
QgsTerrainGenerator
Base class for generators of terrain.
Definition
qgsterraingenerator.h:56
qgschunkloader.h
qgschunknode.h
qgscoordinatetransformcontext.h
qgsrectangle.h
qgstilingscheme.h
Generated on
for QGIS API Documentation by
1.17.0