21 #ifndef EMODNET_QMGC_QUANTIZED_MESH_TILER_H 22 #define EMODNET_QMGC_QUANTIZED_MESH_TILER_H 24 #include "quantized_mesh.h" 25 #include "quantized_mesh_tile.h" 26 #include "tin_creation/tin_creation_cgal_types.h" 28 #include <boost/filesystem.hpp> 29 #include "ellipsoid.h" 30 #include "tin_creation/tin_creator.h" 32 #include "borders_data.h" 34 namespace fs = boost::filesystem ;
44 typedef TinCreation::Point_3 Point_3;
45 typedef TinCreation::Vector_3 Vector_3;
46 typedef TinCreation::Point_2 Point_2;
47 typedef TinCreation::Polyhedron Polyhedron;
68 const ctb::Grid &grid,
69 const ctb::TilerOptions &tilerOptions,
72 : TerrainTiler(dataset, grid, tilerOptions)
74 , m_tinCreator(tinCreator)
81 : TerrainTiler(tiler.poDataset, tiler.mGrid, tiler.options)
82 , m_options(tiler.m_options)
83 , m_tinCreator(tiler.m_tinCreator)
128 float& minHeight,
float& maxHeight,
129 ctb::CRSBounds& tileBounds)
const ;
135 mutable std::mutex m_mutex;
142 void checkOptions() {
144 std::cerr <<
"[WARNING] QuantizedMeshTiler::options HeighMapSamplingSteps < 0, defaulting to 256" << std::endl;
148 std::cerr <<
"[WARNING] QuantizedMeshTiler::options HeighMapSamplingSteps > 256 (maximum), defaulting to 256" << std::endl;
160 float clip(
const float& n,
const float& lower,
const float& upper)
const {
161 return std::max(lower, std::min(n, upper));
178 const Polyhedron& surface,
179 const float& minHeight,
float& maxHeight,
180 const ctb::CRSBounds& tileBounds)
const ;
198 const float& minHeight,
const float& maxHeight,
199 std::vector<Point_3> &tileEastVertices,
200 std::vector<Point_3> &tileWestVertices,
201 std::vector<Point_3> &tileNorthVertices,
202 std::vector<Point_3> &tileSouthVertices )
const ;
205 #endif //EMODNET_QMGC_QUANTIZED_MESH_TILER_H QMTOptions getOptions()
Get the creation options for this tiler (QMTOptions structure)
Definition: quantized_mesh_tiler.h:108
float ClippingLowValue
Minimum value allowed on the raster, clip values if smaller.
Definition: quantized_mesh_tiler.h:56
QuantizedMeshTile createTile(const ctb::TileCoordinate &coord, BordersData &bd)
Create the quantized mesh tile.
Definition: quantized_mesh_tiler.cpp:34
Structure storing the data for the borders of a tile. This includes the 4 east-west-north-south borde...
Definition: borders_data.h:30
QuantizedMeshTiler(GDALDataset *dataset, const ctb::Grid &grid, const ctb::TilerOptions &tilerOptions, const QMTOptions &options, const TinCreation::TinCreator &tinCreator)
Constructor: instantiates a tiler with all required arguments.
Definition: quantized_mesh_tiler.h:67
bool IsBathymetry
Flag indicating wether the values on the raster must be considered as elevations (false) or depths (t...
Definition: quantized_mesh_tiler.h:52
Main class used to create a TIN from an input set of points.
Definition: tin_creator.h:143
Describes an ellipsoid.
Definition: ellipsoid.h:32
Definition: quantized_mesh_tiler.h:51
QuantizedMeshTiler(const QuantizedMeshTiler &tiler)
A copy constructor that does not try to copy the mutex (needed because mutex are non-copyable) ...
Definition: quantized_mesh_tiler.h:80
Tiler of a terrain generating quantized-mesh tiles.
Definition: quantized_mesh_tiler.h:41
The WGS84 ellipsoid.
Definition: ellipsoid.h:86
float ClippingHighValue
Maximum value allowed on the raster, clip values if larger.
Definition: quantized_mesh_tiler.h:55
std::vector< Point_3 > getUVHPointsFromRaster(const ctb::TileCoordinate &coord, BordersData &bd, float &minHeight, float &maxHeight, ctb::CRSBounds &tileBounds) const
Get the heightmap values from the GDAL raster in normalized coordinates.
Definition: quantized_mesh_tiler.cpp:66
Encapsulates a Tile in Quantized Mesh format *.
Definition: quantized_mesh_tile.h:33
void setTinCreatorParamsForZoom(const unsigned int &zoom)
Definition: quantized_mesh_tiler.h:114
Ellipsoid RefEllipsoid
The reference ellipsoid of the tile (needed to compute horizon occlusion point)
Definition: quantized_mesh_tiler.h:53
float AboveSeaLevelScaleFactor
Scale factor to apply to the readings above sea level (ignored if < 0)
Definition: quantized_mesh_tiler.h:57
float BelowSeaLevelScaleFactor
Scale factor to apply to the readings below sea level (ignored if < 0)
Definition: quantized_mesh_tiler.h:58
int HeighMapSamplingSteps
Sampling steps. Maximum = 256!
Definition: quantized_mesh_tiler.h:54