examples/metadata/main.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 // Examples
21 #include "Metadata.h"
22 #include <terralib/common.h>
23 
24 
25 // STL
26 #include <cassert>
27 #include <cstdlib>
28 #include <exception>
29 #include <iostream>
30 
32 {
34 
35  info = te::plugin::GetInstalledPlugin(TE_PLUGINS_PATH + std::string("/te.da.ogr.teplg.json"));
37 
39 }
40 
41 int main(int argc, char** argv)
42 {
43  // initialize Terralib support
44  // It initializes all the data source drivers (see LoadModule.cpp)
45  try
46  {
48 
49  LoadModules();
50 
55 
57 
59  }
60  catch(const std::exception& e)
61  {
62  std::cout << std::endl << "An exception has occurried: " << e.what() << std::endl;
63 
64  std::cout << "Press Enter to exit..." << std::endl;
65  std::cin.get();
66 
67  return EXIT_FAILURE;
68  }
69  catch(...)
70  {
71  std::cout << std::endl << "An unexpected exception has occurried!" << std::endl;
72 
73  std::cout << "Press Enter to exit..." << std::endl;
74  std::cin.get();
75 
76  return EXIT_FAILURE;
77  }
78 
79  std::cout << "Press Enter to exit..." << std::endl;
80  std::cin.get();
81 
82  return EXIT_SUCCESS;
83 }
void ExMetadataExtractor()
Definition: Metadata.cpp:164
void ExMetadataISO19115()
Definition: Metadata.cpp:100
int main(int argc, char **argv)
void finalize()
It finalizes the TerraLib Platform.
static PluginManager & getInstance()
It returns a reference to the singleton instance.
void LoadModules()
It loads the data source drivers.
void initialize()
It initializes the TerraLib Platform.
void ExMetadataManager()
Definition: Metadata.cpp:42
void ExMetadataCycle()
Definition: Metadata.cpp:197
This file contains include headers for the TerraLib Common Runtime module.
The basic information about a plugin.
TEPLUGINEXPORT PluginInfo * GetInstalledPlugin(const std::string &pluginFilePath)
It returns information about a given plugin provided its plugin configuration file name or dir...