| TerraLib 4.1

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

- File List
- File Members

Classes | Defines | Functions | Variables
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/PostgreSQL/TePGInterface.h File Reference

This file contains a database recordset and connection class to PostgreSQL. More...

`#include <libpq-fe.h>`
`#include <netinet/in.h>`
`#include <stdlib.h>`
`#include <string>`
`#include <cstring>`
`#include "../../kernel/TeDatabase.h"`
`#include "../../kernel/TeMultiGeometry.h"`
`#include "../../kernel/TeMutex.h"`
`#include "TePostgreSQLDefines.h"`

Go to the source code of this file.

## Classes

class | TePGConnection
class | TePGRecordset

## Defines

#define | TE_EWKB_ZM_OFFSET 0xC0000000
#define | TE_EWKB_Z_OFFSET 0x80000000
#define | TE_EWKB_M_OFFSET 0x40000000
#define | TE_EWKB_SRID_FLAG 0x20000000
#define | TE_EWKB_BBOX_FLAG 0x10000000

## Functions

TLPOSTGRESQL_DLL char * | TeLine2DToPGBinary (const TeLine2D &line, unsigned int &size)
TLPOSTGRESQL_DLL char * | TeBoxToPGBinary (const TeBox &box, unsigned int &size)
TLPOSTGRESQL_DLL char * | TePointToWKBPoint (const TePoint &point, unsigned int &size)
TLPOSTGRESQL_DLL char * | TeLine2DToWKBLineString (const TeLine2D &line, unsigned int &size)
TLPOSTGRESQL_DLL char * | TePolygonToWKBPolygon (const TePolygon &polygon, unsigned int &size)
TLPOSTGRESQL_DLL double | TeConvertToBigEndian (const double &value)
TLPOSTGRESQL_DLL void | TeConvert2OGCWKBType (unsigned int &gType, bool &isPostGIS)
TLPOSTGRESQL_DLL void | TeConvert2PostGISWKBType (unsigned int &gType)

## Variables

const Oid | PG_BOOL_TYPE = 16
const Oid | PG_BYTEA_TYPE = 17
const Oid | PG_CHAR_TYPE = 18
const Oid | PG_NAME_TYPE = 19
const Oid | PG_INT8_TYPE = 20
const Oid | PG_INT2_TYPE = 21
const Oid | PG_INT4_TYPE = 23
const Oid | PG_TEXT_TYPE = 25
const Oid | PG_OID_TYPE = 26
const Oid | PG_POINT_TYPE = 600
const Oid | PG_LSEG_TYPE = 601
const Oid | PG_PATH_TYPE = 602
const Oid | PG_BOX_TYPE = 603
const Oid | PG_POLYGON_TYPE = 604
const Oid | PG_LINE_TYPE = 628
const Oid | PG_PG_FLOAT4_TYPE = 700
const Oid | PG_FLOAT8_TYPE = 701
const Oid | PG_CIRCLE_TYPE = 718
const Oid | PG_MONEY_TYPE = 790
const Oid | PG_BPCHAR_TYPE = 1042
const Oid | PG_VARCHAR_TYPE = 1043
const Oid | PG_DATE_TYPE = 1082
const Oid | PG_TIME_TYPE = 1083
const Oid | PG_TIMESTAMP_TYPE = 1114
const Oid | PG_TIMESTAMPTZ_TYPE = 1184
const Oid | PG_INTERVAL_TYPE = 1186
const Oid | PG_TIMETZ_TYPE = 1266
const Oid | PG_BIT_TYPE = 1560
const Oid | PG_VARBIT_TYPE = 1562
const Oid | PG_NUMERIC_TYPE = 1700

## Detailed Description

This file contains a database recordset and connection class to PostgreSQL.

Author:
  Gilberto Ribeiro de Queiroz - gribeiro@dpi.inpe.br

## Define Documentation

#define TE_EWKB_BBOX_FLAG 0x10000000

#define TE_EWKB_M_OFFSET 0x40000000

#define TE_EWKB_SRID_FLAG 0x20000000

#define TE_EWKB_Z_OFFSET 0x80000000

#define TE_EWKB_ZM_OFFSET 0xC0000000

## Function Documentation

TLPOSTGRESQL_DLL char* TeBoxToPGBinary | ( | const TeBox & | box,
|  | unsigned int & | size
| ) |  |

TLPOSTGRESQL_DLL void TeConvert2OGCWKBType | ( | unsigned int & | gType,
|  | bool & | isPostGIS
| ) |  |

TLPOSTGRESQL_DLL void TeConvert2PostGISWKBType | ( | unsigned int & | gType | ) |

TLPOSTGRESQL_DLL double TeConvertToBigEndian | ( | const double & | value | ) |

TLPOSTGRESQL_DLL char* TeLine2DToPGBinary | ( | const TeLine2D & | line,
|  | unsigned int & | size
| ) |  |

TLPOSTGRESQL_DLL char* TeLine2DToWKBLineString | ( | const TeLine2D & | line,
|  | unsigned int & | size
| ) |  |

TLPOSTGRESQL_DLL char* TePointToWKBPoint | ( | const TePoint & | point,
|  | unsigned int & | size
| ) |  |

TLPOSTGRESQL_DLL char* TePolygonToWKBPolygon | ( | const TePolygon & | polygon,
|  | unsigned int & | size
| ) |  |

## Variable Documentation

const Oid PG_BIT_TYPE = 1560

const Oid PG_BOOL_TYPE = 16

const Oid PG_BOX_TYPE = 603

const Oid PG_BPCHAR_TYPE = 1042

const Oid PG_BYTEA_TYPE = 17

const Oid PG_CHAR_TYPE = 18

const Oid PG_CIRCLE_TYPE = 718

const Oid PG_DATE_TYPE = 1082

const Oid PG_FLOAT8_TYPE = 701

const Oid PG_INT2_TYPE = 21

const Oid PG_INT4_TYPE = 23

const Oid PG_INT8_TYPE = 20

const Oid PG_INTERVAL_TYPE = 1186

const Oid PG_LINE_TYPE = 628

const Oid PG_LSEG_TYPE = 601

const Oid PG_MONEY_TYPE = 790

const Oid PG_NAME_TYPE = 19

const Oid PG_NUMERIC_TYPE = 1700

const Oid PG_OID_TYPE = 26

const Oid PG_PATH_TYPE = 602

const Oid PG_PG_FLOAT4_TYPE = 700

const Oid PG_POINT_TYPE = 600

const Oid PG_POLYGON_TYPE = 604

const Oid PG_TEXT_TYPE = 25

const Oid PG_TIME_TYPE = 1083

const Oid PG_TIMESTAMP_TYPE = 1114

const Oid PG_TIMESTAMPTZ_TYPE = 1184

const Oid PG_TIMETZ_TYPE = 1266

const Oid PG_VARBIT_TYPE = 1562

const Oid PG_VARCHAR_TYPE = 1043

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines