OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGpkgUtil.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 // File: ossimGpkgUtil.h
3 //
4 // License: LGPL
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Description: OSSIM GeoPackage utility class.
9 //
10 //----------------------------------------------------------------------------
11 // $Id
12 
13 #ifndef ossimGpkgUtil_HEADER
14 #define ossimGpkgUtil_HEADER 1
15 
16 #include <ossim/base/ossimRefPtr.h>
18 #include <iosfwd>
19 #include <vector>
20 
23 class ossimGpkgTileEntry;
26 
27 struct sqlite3;
28 
29 namespace ossim_gpkg
30 {
35  bool checkSignature(std::istream& in);
36 
42 
48  void getTileEntries( sqlite3* db,
49  std::vector<ossimGpkgTileEntry>& entries );
56  bool getTileEntry( sqlite3* db,
57  const std::string& tileTableName,
58  ossimGpkgTileEntry& entry );
59 
68  template <class T> void getGpkgRecords( sqlite3* db,
69  std::vector<T>& result,
70  const std::string& dbTableName );
71 
81  template <class T> void getGpkgRecords( sqlite3* db,
82  std::vector<T>& result,
83  const std::string& dbTableName,
84  const std::string& table_name );
85 
96  template <class T> bool getGpkgRecord( sqlite3* db,
97  T& result,
98  const std::string& dbTableName,
99  const std::string& table_name );
100 
101 
111  bool getSrsRecord( sqlite3* db,
112  ossim_int32 srs_id,
114 
115 
123  bool getTableRows(
124  sqlite3* db,
125  const std::string& tableName,
126  std::vector< ossimRefPtr<ossimGpkgDatabaseRecordBase> >& result );
127 
134  // bool parseGpkgSpatialRefSysTables(
135  // sqlite3* db, std::vector< ossimRefPtr<ossimGpkgSpatialRefSysRecord> >& result );
136 
143  // bool parseGpkgTileMatrixSetTables(
144  // sqlite3* db, std::vector< ossimRefPtr<ossimGpkgTileMatrixSetRecord> >& result );
145 
146 
153  // bool parseGpkgTileMatrixTables(
154  // sqlite3* db, std::vector< ossimRefPtr<ossimGpkgTileMatrixRecord> >& result );
155 
162  const std::string& tableName );
163 
164  std::ostream& printTiles(sqlite3* db, const std::string& tileTableName, std::ostream& out);
165 }
166 
167 #endif /* #ifndef ossimGpkgUtil_HEADER */
void getTileEntries(sqlite3 *db, std::vector< ossimGpkgTileEntry > &entries)
Gets all the tile entries.
bool getSrsRecord(sqlite3 *db, ossim_int32 srs_id, ossimGpkgSpatialRefSysRecord &srs)
Get gpkg_spatial_ref_sys record for srs_it.
bool checkApplicationId(std::istream &in)
Check application_id.
bool getTileEntry(sqlite3 *db, const std::string &tileTableName, ossimGpkgTileEntry &entry)
Gets tile entry whos table_name field matches tileTableName.
bool getTableRows(sqlite3 *db, const std::string &tableName, std::vector< ossimRefPtr< ossimGpkgDatabaseRecordBase > > &result)
Parse table rows.
void getGpkgRecords(sqlite3 *db, std::vector< T > &result, const std::string &dbTableName)
Get gpkg records.
bool checkSignature(std::istream &in)
Check signature method.
std::ostream & printTiles(sqlite3 *db, const std::string &tileTableName, std::ostream &out)
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
ossimRefPtr< ossimGpkgDatabaseRecordBase > getNewTableRecord(const std::string &tableName)
Parse gpkg_spatial_ref_sys tables.
bool getGpkgRecord(sqlite3 *db, T &result, const std::string &dbTableName, const std::string &table_name)
Get gpkg record.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
int ossim_int32