VTK
|
Read vector file formats using GDAL. More...
#include <vtkGDALVectorReader.h>
Public Types | |
typedef vtkMultiBlockDataSetAlgorithm | Superclass |
Public Member Functions | |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | IsA (const char *type) |
vtkGDALVectorReader * | NewInstance () 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 vtkGDALVectorReader * | New () |
static int | IsTypeOf (const char *type) |
static vtkGDALVectorReader * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () 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. |
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).
Definition at line 40 of file vtkGDALVectorReader.h.
Reimplemented from vtkMultiBlockDataSetAlgorithm.
Definition at line 45 of file vtkGDALVectorReader.h.
vtkGDALVectorReader::vtkGDALVectorReader | ( | ) | [protected] |
virtual vtkGDALVectorReader::~vtkGDALVectorReader | ( | ) | [protected, virtual] |
static vtkGDALVectorReader* vtkGDALVectorReader::New | ( | ) | [static] |
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.
static vtkGDALVectorReader* vtkGDALVectorReader::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
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.
int vtkGDALVectorReader::GetLayerType | ( | int | layerIndex = 0 | ) |
Given a index return layer type (eg point, line, polygon).
int vtkGDALVectorReader::GetFeatureCount | ( | int | layerIndex = 0 | ) |
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.
virtual int vtkGDALVectorReader::GetActiveLayer | ( | ) | [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.
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.
virtual int vtkGDALVectorReader::GetAppendFeatures | ( | ) | [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::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.
virtual int vtkGDALVectorReader::GetAddFeatureIds | ( | ) | [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::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.
int vtkGDALVectorReader::RequestInformation | ( | vtkInformation * | , |
vtkInformationVector ** | , | ||
vtkInformationVector * | |||
) | [protected, virtual] |
This is called by the superclass. This is the method you should override.
Reimplemented from vtkMultiBlockDataSetAlgorithm.
int vtkGDALVectorReader::RequestData | ( | vtkInformation * | , |
vtkInformationVector ** | , | ||
vtkInformationVector * | |||
) | [protected, virtual] |
This is called by the superclass. This is the method you should override.
Reimplemented from vtkMultiBlockDataSetAlgorithm.
int vtkGDALVectorReader::InitializeInternal | ( | ) | [protected] |
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.
int vtkGDALVectorReader::ActiveLayer [protected] |
Definition at line 116 of file vtkGDALVectorReader.h.
int vtkGDALVectorReader::AppendFeatures [protected] |
Definition at line 117 of file vtkGDALVectorReader.h.
int vtkGDALVectorReader::AddFeatureIds [protected] |
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.
int vtkGDALVectorReader::OGRRegistered [static, protected] |
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.