A class that can parses a file with wkb encoded geometries.
More...
#include <GeometryFile.h>
|
std::auto_ptr< std::ifstream > | m_file |
| Pointer to the geometry file. More...
|
|
std::vector< unsigned int > | m_gids |
| Selected ids to use on traverse operation. More...
|
|
unsigned int | m_i |
| Current position on traversing. More...
|
|
std::auto_ptr< std::ifstream > | m_posFile |
| Pointer to the geometry pos file. More...
|
|
A class that can parses a file with wkb encoded geometries.
Definition at line 54 of file GeometryFile.h.
GeometryFile::GeometryFile |
( |
| ) |
|
GeometryFile::~GeometryFile |
( |
| ) |
|
Returns the next geometry.
If the setGeometries was used, then the geometries to be returned are the geometries identified by ids given to the function, otherwise it will traverse the entire file.
- Returns
- The next geometry on the file or NULL if there's no more geometries to get.
- Note
- The ownership of the returned geometries are given to the caller.
Opens the file fileName.
- Parameters
-
fileName | The name of geometry file. (File extension is .geom) |
- Exceptions
-
- Note
- There's no check about the file contents, just for its existence. It means that if an unknown type of file was passed, it will try to open it. The behavior of the class then is unknown.
void GeometryFile::setGeometries |
( |
const std::vector< unsigned int > & |
gids | ) |
|
Sets the desired geometries to get from file.
This is a filter of the traversing file. If this is used before next was called, only geometries indentified by gids will be returned by next function. If not defined the file will be entirely traversed.
- Parameters
-
gids | Ids of the geometries to be filtered. These values comes from 'FID' column. |
static void GeometryFile::writeGeometries |
( |
const char * |
fileName, |
|
|
const std::map< int, te::gm::Geometry * > & |
geoms |
|
) |
| |
|
static |
static void GeometryFile::writeGeometries |
( |
const char * |
fileName, |
|
|
const std::vector< te::gm::Geometry * > & |
geoms |
|
) |
| |
|
static |
std::auto_ptr<std::ifstream> GeometryFile::m_file |
|
protected |
std::vector<unsigned int> GeometryFile::m_gids |
|
protected |
Selected ids to use on traverse operation.
Definition at line 117 of file GeometryFile.h.
unsigned int GeometryFile::m_i |
|
protected |
std::auto_ptr<std::ifstream> GeometryFile::m_posFile |
|
protected |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/qt/plugins/edit/GeometryFile.h