|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <TerrariumTileFetcher.h>
Inheritance diagram for TerrariumTileFetcher:
Collaboration diagram for TerrariumTileFetcher:Public Member Functions | |
| TerrariumTileFetcher (QObject *parent=nullptr, QNetworkAccessManager *networkManager=nullptr) | |
| networkManager overrides the internally created one (test injection seam) | |
| int | requestPatchHeights (const TileMath::TileKey &key, int gridSize) final |
| Request the vertex height grid for a patch. Returns a request id (> 0). | |
| void | cancelRequest (int requestId) final |
| Cancel a pending request. No signal is emitted for a cancelled request. | |
| bool | requestTile (const TileMath::TileKey &key) override |
| int | pendingCount () const |
| TileMath::TileKey | lastFetchKey () const |
Public Member Functions inherited from HeightSource | |
| HeightSource (QObject *parent=nullptr) | |
| void | setHeightField (HeightField *field) |
| Field that receives whole tiles requested via requestTile (not owned) | |
Static Public Attributes | |
| static constexpr int | kMaxTileZoom = 15 |
| Highest zoom the terrarium dataset serves (deeper patches sample the ancestor) | |
| static constexpr int | kMaxGridSize = 256 |
| Largest supported patch grid (matches PatchGeometry::kMaxGridSize) | |
Additional Inherited Members | |
Signals inherited from HeightSource | |
| void | patchHeightsReady (int requestId, const QList< float > &heights) |
| heights has (gridSize+1)^2 entries, row-major from the north-west corner | |
| void | patchHeightsFailed (int requestId) |
Protected Member Functions inherited from HeightSource | |
| int | _nextRequestId () |
Protected Attributes inherited from HeightSource | |
| HeightField * | _heightField = nullptr |
| tile delivery target for requestTile (not owned) | |
Fetcher over the AWS Open Data Terrain Tiles (terrarium encoding): real elevations at every patch zoom from one slippy PNG tile per patch, cache-first through QGC's shared tile database with a direct network fallback on miss (fetched tiles are stored back).
requestTile delivers whole decoded tiles into an attached HeightField, which notifies consumers via regionChanged. A failed fetch inserts nothing: the field keeps serving its current best estimate.
A tile at z/x/y maps to the terrarium tile at the same z/x/y, so fetch cost is constant across the LOD range — no flat floor or blend band like the fixed resolution Copernicus pipeline needed. Above the dataset's top zoom the z15 ancestor tile is fetched instead.
The legacy per-patch HeightSource API (bilinear vertex-grid sampling with edge clamp) remains until SurfaceModel switches to sampling the field.
Definition at line 40 of file TerrariumTileFetcher.h.
|
explicit |
networkManager overrides the internally created one (test injection seam)
Definition at line 130 of file TerrariumTileFetcher.cc.
|
finalvirtual |
Cancel a pending request. No signal is emitted for a cancelled request.
Implements HeightSource.
Definition at line 265 of file TerrariumTileFetcher.cc.
|
inline |
Tile key submitted by the most recent fetch (test observability for the deep-zoom ancestor path)
Definition at line 67 of file TerrariumTileFetcher.h.
|
inline |
Definition at line 63 of file TerrariumTileFetcher.h.
|
finalvirtual |
Request the vertex height grid for a patch. Returns a request id (> 0).
Implements HeightSource.
Definition at line 136 of file TerrariumTileFetcher.cc.
References HeightSource::_nextRequestId(), TileMath::isValidKey(), kMaxGridSize, kMaxTileZoom, TileMath::TileKey::x, TileMath::TileKey::y, and TileMath::TileKey::zoom.
|
overridevirtual |
Ensures the attached field holds this tile (clamped to the z15 ancestor above kMaxTileZoom). Returns false when no field is attached, the key is invalid, or the fetch could not start; true when the tile is already held, already in flight, or a fetch was started.
Reimplemented from HeightSource.
Definition at line 187 of file TerrariumTileFetcher.cc.
References HeightSource::_heightField, HeightField::hasTile(), and TileMath::isValidKey().
|
staticconstexpr |
Largest supported patch grid (matches PatchGeometry::kMaxGridSize)
Definition at line 52 of file TerrariumTileFetcher.h.
Referenced by requestPatchHeights().
|
staticconstexpr |
Highest zoom the terrarium dataset serves (deeper patches sample the ancestor)
Definition at line 49 of file TerrariumTileFetcher.h.
Referenced by requestPatchHeights().