GL Studio C++ Runtime API
gls_map_geotiff.h
Go to the documentation of this file.
1 /*! \file
2  \brief The GeoTIFFMapChartDataSource class.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2017 The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef _GEOTIFF_MAP_CHART_DATA_SOURCE_H
41 #define _GEOTIFF_MAP_CHART_DATA_SOURCE_H
42 
44 #include "gls_map_util.h"
45 #include <map>
46 #include <string>
47 #include <vector>
48 
49 #define LIB_BASE_NAME "gls_map_geotiff"
50 #include "gls_auto_lib.h"
51 #undef LIB_BASE_NAME
52 
53 namespace disti
54 {
55 class GeoTIFFMapChartCell;
56 class GeoTIFFImageHolder;
57 
58 /** \defgroup ds_GeoTIFF GeoTIFF
59  * GeoTIFF data source
60  */
61 
62 /** Runtime implementation of a GlsMapGeoTIFF
63  * \ingroup ds_GeoTIFF
64  * @{
65  */
67 {
68 public:
69  /** Create a new GlsMapGeoTIFF. */
71 
72  /** Destructs a GlsMapGeoTIFF object */
74 
75  /// Load one or more GeoTIFF images.
76  /// \param str A string containing one filename, a comma separated list of filenames
77  /// a directory to parse, recursively, looking for files to load.
78  void LoadGeoTIFF( const std::string& str );
79 
80  /// Unload one or more GeoTIFF images.
81  /// \param str Must be the same string passed to LoadGeoTIFF
82  void UnloadGeoTIFF( const std::string& str );
83 
84  /// Set the target rate in hz at which cells will be loaded
85  /// \param targetCellLoadRate target rate in hz else 0.0 for no target rate ( i.e. load as quickly as possible )
86  void SetTargetCellLoadRate( const double targetCellLoadRate );
87 
88  /// Get the target rate in hz at which cells will be loaded
89  /// \return target rate in hz else 0.0 for no target rate ( i.e. load as quickly as possible )
90  double GetTargetCellLoadRate() const;
91 
92  /// See base class.
93  bool GetAvailableCoverage( GeoRect* dest ) DISTI_METHOD_OVERRIDE;
94 
95  /// See base class.
96  void GetCellList( const GeoRect& coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList& viewList ) DISTI_METHOD_OVERRIDE;
97 
98  /// Set the count of the layer cache
99  /// \param cacheCount max number of layers to cache else 0u to disable layer caching
100  void SetCacheCount( const unsigned int cacheCount );
101 
102  // Get the count of the layer cache
103  // \return max number of layers to cache ( 0u if caching is disabled )
104  unsigned int GetCacheCount() const;
105 
106 protected:
107  void SearchDirectory( const std::string& entity, const std::string& originalLoadString );
108  void LoadGeoTIFF( const std::string& str, const std::string& originalLoadString );
109 
110  /// The lat/lon boundries of the data contained in this Map Chart Data Source.
112 
113  std::vector<GeoTIFFImageHolder*> _imageHolders;
114 };
115 /// @}
116 } // namespace disti
117 
118 #endif // _GEOTIFF_MAP_CHART_DATA_SOURCE_H
Definition: gls_map_geotiff.h:66
bool GetAvailableCoverage(GeoRect *dest) DISTI_METHOD_OVERRIDE
See base class.
void SetTargetCellLoadRate(const double targetCellLoadRate)
Definition: gls_map_chart_data_source.h:210
Definition: gls_map_util.h:414
Utility classes for GL Studio Map toolkit.
void GetCellList(const GeoRect &coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList) DISTI_METHOD_OVERRIDE
See base class.
GeoRect _extents
The lat/lon boundries of the data contained in this Map Chart Data Source.
Definition: gls_map_geotiff.h:111
void UnloadGeoTIFF(const std::string &str)
The disti::GlsMapChartDataSource class.
The gls_auto_lib.
double GetTargetCellLoadRate() const
void SetCacheCount(const unsigned int cacheCount)
Definition: bmpimage.h:46
void LoadGeoTIFF(const std::string &str)