![]() |
TerraLib 4.1
|
00001 /************************************************************************************ 00002 TerraLib - a library for developing GIS applications. 00003 Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio. 00004 00005 This code is part of the TerraLib library. 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either 00009 version 2.1 of the License, or (at your option) any later version. 00010 00011 You should have received a copy of the GNU Lesser General Public 00012 License along with this library. 00013 00014 The authors reassure the license terms regarding the warranties. 00015 They specifically disclaim any warranties, including, but not limited to, 00016 the implied warranties of merchantability and fitness for a particular purpose. 00017 The library provided hereunder is on an "as is" basis, and the authors have no 00018 obligation to provide maintenance, support, updates, enhancements, or modifications. 00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct, 00020 indirect, special, incidental, or consequential damages arising out of the use 00021 of this library and its documentation. 00022 *************************************************************************************/ 00026 #ifndef __TERRALIB_INTERNAL_DRIVERCSV_H 00027 #define __TERRALIB_INTERNAL_DRIVERCSV_H 00028 00029 #include "../kernel/TeTable.h" 00030 #include "../kernel/TeBox.h" 00031 #include "../kernel/TeDataTypes.h" 00032 00033 #include "TeFunctionsDefines.h" 00034 00035 #include <string> 00036 using namespace std; 00037 00038 class TeLayer; 00039 class TeAsciiFile; 00040 class TeProjection; 00041 class TeDatabase; 00042 class TeQuerier; 00043 class TeTheme; 00044 00061 TLFUNCTIONS_DLL bool TeImportCSVFile(const string& csvFileName, TeTable& attrTable, TeDatabase* db, TeLayer* layer=0, 00062 const char& separator=',', const bool& firstLineIsHeader=false, 00063 const unsigned int& chunkSize=100, const bool& createAutoNum = false); 00064 00078 TLFUNCTIONS_DLL bool TeImportCSVFile(const string& csvFileName, const int& attributeX, const int& attributeY, 00079 TeTable& attrTable, TeDatabase* db, TeLayer* layer, 00080 const char& separator=',', const bool& firstLineIsHeader=false, 00081 const unsigned int& chunkSize=100, const bool& createAutoNum = false); 00082 00091 TLFUNCTIONS_DLL bool TeExportQuerierToCSV(TeQuerier* querier, const std::string& filename, const char& sep=';'); 00092 00101 TLFUNCTIONS_DLL bool TeExportLayerToCSV(TeLayer* layer, const string& filename="", const char& sep=';'); 00102 00112 TLFUNCTIONS_DLL bool TeExportThemeToCSV(TeTheme* theme, TeSelectedObjects selOb, const std::string& filename="", const char& sep=';'); 00113 // End of subgroup CSV format 00115 00116 #endif 00117