| TerraLib 4.1

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

- File List
- File Members

Classes | Defines | Functions
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeCoverageImport.h File Reference
`#include <sstream>`
`#include "TeCoverageParams.h"`
`#include "TeCoverageUtils.h"`
`#include "TeCoverageImportUtils.h"`
`#include <TeQuerier.h>`
`#include <TeQuerierParams.h>`

Go to the source code of this file.

## Classes

struct | SerializedPair< T >
struct | CmpSerializedX< T >
struct | CmpSerializedY< T >

## Defines

#define | WRITE(data, t, v) *((t*)(data)) = v; data += sizeof(t)
| Write a value of some type in a block of raw data.

## Functions

template<class T >
void | splitSerialized (std::vector< SerializedPair< T > * > &src, typename std::vector< SerializedPair< T > * >::iterator &begin, typename std::vector< SerializedPair< T > * >::iterator &end, std::vector< std::vector< SerializedPair< T > > > &clusters)
template<class T >
void | clusterSerialized (std::vector< SerializedPair< T > > &srcGroup, std::vector< std::vector< SerializedPair< T > > > &clusters)
template<class T >
void | populateDatabase (TeLayer *layer, const std::string &coverageId, std::vector< std::vector< SerializedPair< T > > > &groups)
bool | decodeLayer (TeLayer *srcLayer, const std::vector< std::string > &columns, std::vector< SerializedPair< TePoint > > &serializedVector, std::vector< TeCoverageDimension > &dimensions)
| Specialization for decoding a point layer.
bool | decodeLayer (TeLayer *srcLayer, const std::vector< std::string > &columns, std::vector< SerializedPair< TeLine2D > > &serializedVector, std::vector< TeCoverageDimension > &dimensions)
bool | decodeLayer (TeLayer *srcLayer, const std::vector< std::string > &columns, std::vector< SerializedPair< TePolygon > > &serializedVector, std::vector< TeCoverageDimension > &dimensions)
template<class T >
bool | TeCoverageImportLayer (TeLayer *layer, TeLayer *srcLayer, const std::vector< std::string > &columns, const std::string &coverageId)
| Import Coverage from a layer of geometries, creating a new layer.
template<class T >
TeLayer * | TeCoverageImportLayer (TeDatabase *database, const std::string &layerName, TeLayer *srcLayer, const std::vector< std::string > &columns, const std::string &coverageId)
| Import Coverage from a layer of geometries.

## Detailed Description

This file contains algorithms for importing Coverage data
  to a TerraLib database.

## Define Documentation

#define WRITE | ( |  | data,
|  |  | t,
|  |  | v
| ) |  | *((t*)(data)) = v; data += sizeof(t)

Write a value of some type in a block of raw data.

## Function Documentation

template<class T >

void clusterSerialized | ( | std::vector< SerializedPair< T > > & | srcGroup,
|  | std::vector< std::vector< SerializedPair< T > > > & | clusters
| ) |  |

bool decodeLayer | ( | TeLayer * | srcLayer,
|  | const std::vector< std::string > & | columns,
|  | std::vector< SerializedPair< TePoint > > & | serializedVector,
|  | std::vector< TeCoverageDimension > & | dimensions
| ) |  |

Specialization for decoding a point layer.

bool decodeLayer | ( | TeLayer * | srcLayer,
|  | const std::vector< std::string > & | columns,
|  | std::vector< SerializedPair< TeLine2D > > & | serializedVector,
|  | std::vector< TeCoverageDimension > & | dimensions
| ) |  |

bool decodeLayer | ( | TeLayer * | srcLayer,
|  | const std::vector< std::string > & | columns,
|  | std::vector< SerializedPair< TePolygon > > & | serializedVector,
|  | std::vector< TeCoverageDimension > & | dimensions
| ) |  |

template<class T >

void populateDatabase | ( | TeLayer * | layer,
|  | const std::string & | coverageId,
|  | std::vector< std::vector< SerializedPair< T > > > & | groups
| ) |  |

template<class T >

void splitSerialized | ( | std::vector< SerializedPair< T > * > & | src,
|  | typename std::vector< SerializedPair< T > * >::iterator & | begin,
|  | typename std::vector< SerializedPair< T > * >::iterator & | end,
|  | std::vector< std::vector< SerializedPair< T > > > & | clusters
| ) |  |

template<class T >

TeLayer* TeCoverageImportLayer | ( | TeDatabase * | database,
|  | const std::string & | layerName,
|  | TeLayer * | srcLayer,
|  | const std::vector< std::string > & | columns,
|  | const std::string & | coverageId
| ) |  |

Import Coverage from a layer of geometries.

Import a Coverage from an existing layer of geometries in
  a TerraLib database to an existing layer of a TerraLib database.

Parameters:

  layer | pointer to a layer already created
  srcLayer | pointer to the existing layer of geometries
  srcAttrTableName | name of an existing attributes table
  columns | columns of the attributes table to be imported
  coverageId | identifier of the coverage to be imported

Returns:
  a pointer to the generated layer

template<class T >

bool TeCoverageImportLayer | ( | TeLayer * | layer,
|  | TeLayer * | srcLayer,
|  | const std::vector< std::string > & | columns,
|  | const std::string & | coverageId
| ) |  |

Import Coverage from a layer of geometries, creating a new layer.

Import a Coverage from an existing layer of geometries in
  a TerraLib database, creating a new layer where the coverage is stored.

Parameters:

  database | a pointer to the database to where the coverage will be imported
  layerName | name of the layer to be created
  srcLayer | pointer to the existing layer of geometries
  srcAttrTableName | name of an existing attributes table
  columns | columns of the attributes table to be imported
  coverageId | identifier of the coverage to be imported

Returns:
  a pointer to the generated layer

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines