| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/PostgreSQL/TePGUtils.h
Go to the documentation of this file.

    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 *************************************************************************************/
    00028 #ifndef  __TERRALIB_INTERNAL_TePOSTGRESQLUTILS_H
    00029 #define  __TERRALIB_INTERNAL_TePOSTGRESQLUTILS_H
    00030
    00031 #include "../../kernel/TeGeometry.h"
    00032
    00033 #include "TePostgreSQLDefines.h"
    00034
    00035 #define COORDS_DELIM             ','
    00036
    00037 #define COORD_DELIM                         ' '
    00038
    00039 #define LINES_DELIM              ','
    00040
    00041 #define LDELIM_POINT             '('
    00042 #define RDELIM_POINT             ')'
    00043
    00044 #define LDELIM_LINESTRING        '('
    00045 #define RDELIM_LINESTRING        ')'
    00046
    00047 #define LDELIM_POLYGON                      '('
    00048 #define RDELIM_POLYGON                      ')'
    00049
    00050 #define LDELIM_BOX                          '('
    00051 #define RDELIM_BOX                          ')'
    00052
    00053 // DELIMITADORES PARA TIPOS GEOMETRICOS DO POSTGRESQL
    00054 #define LDELIM_PGGEOMPOLYGON       '('
    00055 #define RDELIM_PGGEOMPOLYGON       ')'
    00056
    00057 #define PGGEOMPOLYGON_COORDS_DELIM ','
    00058
    00059 /*
    00060  * Codificadores e decodificadores de tipos geometricos do PostgreSQL.
    00061  * Essas funcoes sao para o driver sem extensao espacial.
    00062  *
    00063  */
    00064
    00066 TLPOSTGRESQL_DLL TeCoord2D PgGeomPolygonCoordDecode(char *str, char* *s);
    00067
    00069 TLPOSTGRESQL_DLL void Te2PgGeomPolygon(const TeLine2D& l, string& strPolygon);
    00070
    00072 TLPOSTGRESQL_DLL TeLine2D PgGeomPolygon2Te(char* strPolygon);
    00073
    00074 /*
    00075  * Codificadores e decodificadores PostGIS - Texto
    00076  *
    00077  */
    00078 TLPOSTGRESQL_DLL TeCoord2D PGCoord_decode(char *str, char* *s);
    00079
    00080 TLPOSTGRESQL_DLL string PGCoord_encode(const TeCoord2D& c);
    00081
    00082 TLPOSTGRESQL_DLL TePoint PGPoint_decode(char *str);
    00083
    00084 TLPOSTGRESQL_DLL string PGPoint_encode(const TePoint& p);
    00085
    00086 TLPOSTGRESQL_DLL string PGNode_encode(const TeNode& p);
    00087
    00088 TLPOSTGRESQL_DLL TeLine2D PGLine_decode(char *str, char* *sd);
    00089
    00090 TLPOSTGRESQL_DLL TeLine2D PGLinestring_decode(char *str);
    00091
    00092 TLPOSTGRESQL_DLL TePolygon PGPolygon_decode(char *str);
    00093
    00094 TLPOSTGRESQL_DLL TeBox PGBox_decode(char *str);
    00095
    00096 TLPOSTGRESQL_DLL string PGBox_encode(const TeBox& b);
    00097
    00098 TLPOSTGRESQL_DLL TeBox PGBoxRtree_decode(char *str);
    00099
    00100 TLPOSTGRESQL_DLL string PGBoxRtree_encode(const TeBox& b);
    00101
    00102 TLPOSTGRESQL_DLL void PGConcatLineString(const TeLine2D& l, string& concatString);
    00103
    00104 TLPOSTGRESQL_DLL TeBox PGBoxFromPolygon(char *str);
    00105
    00106 TLPOSTGRESQL_DLL string PGMakePolygon(const TeBox& box);
    00107
    00108
    00109 #endif     // __TERRALIB_INTERNAL_TePOSTGRESQLUTILS_H
    00110

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines