VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
vtkGDALVectorReader Class Reference

Read vector file formats using GDAL. More...

#include <vtkGDALVectorReader.h>

Inheritance diagram for vtkGDALVectorReader:
Inheritance graph
[legend]
Collaboration diagram for vtkGDALVectorReader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
vtkMultiBlockDataSetAlgorithm 
Superclass

Public Member Functions

virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual int IsA (const char *type)
vtkGDALVectorReaderNewInstance () const
virtual void SetFileName (const char *)
virtual char * GetFileName ()
int GetNumberOfLayers ()
int GetLayerType (int layerIndex=0)
int GetFeatureCount (int layerIndex=0)
int GetActiveLayerType ()
int GetActiveLayerFeatureCount ()
const char * GetLayerProjection (int layerIndex)
virtual void SetActiveLayer (int)
virtual int GetActiveLayer ()
virtual void SetAppendFeatures (int)
virtual int GetAppendFeatures ()
virtual void AppendFeaturesOn ()
virtual void AppendFeaturesOff ()
std::map< int, std::string > GetLayersProjection ()
virtual void SetAddFeatureIds (int)
virtual int GetAddFeatureIds ()
virtual void AddFeatureIdsOn ()
virtual void AddFeatureIdsOff ()

Static Public Member Functions

static vtkGDALVectorReaderNew ()
static int IsTypeOf (const char *type)
static vtkGDALVectorReaderSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkGDALVectorReader ()
virtual ~vtkGDALVectorReader ()
int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int InitializeInternal ()

Protected Attributes

char * FileName
 The name of the file that will be opened on the next call to RequestData()
int ActiveLayer
int AppendFeatures
int AddFeatureIds
vtkGDALVectorReader::Internal * Implementation
 Private per-file metadata.
std::map< int, std::string > LayersProjection
 Mapping of layer to projection.

Static Protected Attributes

static int OGRRegistered
 Global variable indicating whether the OGR library has been registered yet or not.

Detailed Description

Read vector file formats using GDAL.

vtkGDALVectorReader is a source object that reads vector files and uses GDAL as the underlying library for the task. GDAL is required for this reader. The output of the reader is a vtkMultiBlockDataSet

This filter uses the ActiveLayer member to only load entries from the specified layer (when ActiveLayer >= 0).

See also:
vtkMultiBlockDataSet
Tests:
vtkGDALVectorReader (Tests)

Definition at line 40 of file vtkGDALVectorReader.h.


Member Typedef Documentation

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Definition at line 45 of file vtkGDALVectorReader.h.


Constructor & Destructor Documentation

virtual vtkGDALVectorReader::~vtkGDALVectorReader ( ) [protected, virtual]

Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual void vtkGDALVectorReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

static int vtkGDALVectorReader::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual int vtkGDALVectorReader::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual vtkObjectBase* vtkGDALVectorReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual void vtkGDALVectorReader::SetFileName ( const char *  ) [virtual]
virtual char* vtkGDALVectorReader::GetFileName ( ) [virtual]

Return number of layers.

Given a index return layer type (eg point, line, polygon).

Given a layer index return number of features (shapes).

Return the active layer type (eg point, line, polygon).

Return the number of features in the active layer (shapes).

virtual void vtkGDALVectorReader::SetActiveLayer ( int  ) [virtual]

Set and Get the active layer. If ActiveLayer is less than 0 (the default is -1), then all layers are read. Otherwise, only the specified layer is read.

Set and Get the active layer. If ActiveLayer is less than 0 (the default is -1), then all layers are read. Otherwise, only the specified layer is read.

virtual void vtkGDALVectorReader::SetAppendFeatures ( int  ) [virtual]

Set and Get whether features are appended to a single vtkPolyData. Turning the option on is useful when a shapefile has a number of features which could otherwise lead to a huge multiblock structure.

Set and Get whether features are appended to a single vtkPolyData. Turning the option on is useful when a shapefile has a number of features which could otherwise lead to a huge multiblock structure.

virtual void vtkGDALVectorReader::AppendFeaturesOn ( ) [virtual]

Set and Get whether features are appended to a single vtkPolyData. Turning the option on is useful when a shapefile has a number of features which could otherwise lead to a huge multiblock structure.

virtual void vtkGDALVectorReader::AppendFeaturesOff ( ) [virtual]

Set and Get whether features are appended to a single vtkPolyData. Turning the option on is useful when a shapefile has a number of features which could otherwise lead to a huge multiblock structure.

std::map<int, std::string> vtkGDALVectorReader::GetLayersProjection ( )

Return projection string belong to each layer.

const char* vtkGDALVectorReader::GetLayerProjection ( int  layerIndex)

Return projection string belong to a layer.

virtual void vtkGDALVectorReader::SetAddFeatureIds ( int  ) [virtual]

Set/get whether feature IDs should be generated. Some GDAL primitives (e.g., a polygon with a hole in its interior) are represented by multiple VTK cells. If you wish to identify the primitive responsible for a VTK cell, turn this on. It is off by default for backwards compatibility. The array of feature IDs will be the active cell-data pedigree IDs.

Set/get whether feature IDs should be generated. Some GDAL primitives (e.g., a polygon with a hole in its interior) are represented by multiple VTK cells. If you wish to identify the primitive responsible for a VTK cell, turn this on. It is off by default for backwards compatibility. The array of feature IDs will be the active cell-data pedigree IDs.

virtual void vtkGDALVectorReader::AddFeatureIdsOn ( ) [virtual]

Set/get whether feature IDs should be generated. Some GDAL primitives (e.g., a polygon with a hole in its interior) are represented by multiple VTK cells. If you wish to identify the primitive responsible for a VTK cell, turn this on. It is off by default for backwards compatibility. The array of feature IDs will be the active cell-data pedigree IDs.

virtual void vtkGDALVectorReader::AddFeatureIdsOff ( ) [virtual]

Set/get whether feature IDs should be generated. Some GDAL primitives (e.g., a polygon with a hole in its interior) are represented by multiple VTK cells. If you wish to identify the primitive responsible for a VTK cell, turn this on. It is off by default for backwards compatibility. The array of feature IDs will be the active cell-data pedigree IDs.

This is called by the superclass. This is the method you should override.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

This is called by the superclass. This is the method you should override.

Reimplemented from vtkMultiBlockDataSetAlgorithm.


Member Data Documentation

char* vtkGDALVectorReader::FileName [protected]

The name of the file that will be opened on the next call to RequestData()

Definition at line 114 of file vtkGDALVectorReader.h.

Definition at line 116 of file vtkGDALVectorReader.h.

Definition at line 117 of file vtkGDALVectorReader.h.

Definition at line 118 of file vtkGDALVectorReader.h.

vtkGDALVectorReader::Internal* vtkGDALVectorReader::Implementation [protected]

Private per-file metadata.

Definition at line 121 of file vtkGDALVectorReader.h.

Global variable indicating whether the OGR library has been registered yet or not.

Definition at line 127 of file vtkGDALVectorReader.h.

std::map<int, std::string> vtkGDALVectorReader::LayersProjection [protected]

Mapping of layer to projection.

Definition at line 130 of file vtkGDALVectorReader.h.


The documentation for this class was generated from the following file: