VTK
vtkGDALVectorReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGDALVectorReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
33 #ifndef vtkGDALVectorReader_h
34 #define vtkGDALVectorReader_h
35 
37 #include "vtkIOGDALModule.h" // For export macro
38 
39 #include <map> // STL required.
40 
41 class VTKIOGDAL_EXPORT vtkGDALVectorReader : public vtkMultiBlockDataSetAlgorithm
42 {
43 public:
45  virtual void PrintSelf( ostream& os, vtkIndent indent );
47 
48  vtkSetStringMacro(FileName);
49  vtkGetStringMacro(FileName);
50 
55 
59  int GetLayerType(int layerIndex=0);
60 
64  int GetFeatureCount(int layerIndex=0);
65 
70 
75 
77 
82  vtkSetMacro(ActiveLayer,int);
83  vtkGetMacro(ActiveLayer,int);
85 
87 
93  vtkSetMacro(AppendFeatures, int);
94  vtkGetMacro(AppendFeatures, int);
95  vtkBooleanMacro(AppendFeatures, int);
97 
101  std::map<int, std::string> GetLayersProjection();
102 
106  const char* GetLayerProjection(int layerIndex);
107 
109 
119  vtkSetMacro(AddFeatureIds,int);
120  vtkGetMacro(AddFeatureIds,int);
121  vtkBooleanMacro(AddFeatureIds,int);
123 
124 protected:
127 
130 
132 
134  char* FileName;
135 
139 
140  class Internal;
141 
143  vtkGDALVectorReader::Internal* Implementation;
144 
146  static int OGRRegistered;
147 
149  std::map<int, std::string> LayersProjection;
150 
151 private:
152  vtkGDALVectorReader(const vtkGDALVectorReader&) VTK_DELETE_FUNCTION;
153  void operator=(const vtkGDALVectorReader&) VTK_DELETE_FUNCTION;
154 };
155 
156 #endif // vtkGDALVectorReader_h
vtkGDALVectorReader::vtkGDALVectorReader
vtkGDALVectorReader()
vtkGDALVectorReader::GetActiveLayerFeatureCount
int GetActiveLayerFeatureCount()
Return the number of features in the active layer (shapes).
vtkGDALVectorReader::GetActiveLayerType
int GetActiveLayerType()
Return the active layer type (eg point, line, polygon).
vtkGDALVectorReader::GetLayerType
int GetLayerType(int layerIndex=0)
Given a index return layer type (eg point, line, polygon).
vtkGDALVectorReader::GetFeatureCount
int GetFeatureCount(int layerIndex=0)
Given a layer index return number of features (shapes).
vtkGDALVectorReader::AddFeatureIds
int AddFeatureIds
Definition: vtkGDALVectorReader.h:138
vtkGDALVectorReader::GetLayerProjection
const char * GetLayerProjection(int layerIndex)
Return projection string belong to a layer.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkGDALVectorReader::OGRRegistered
static int OGRRegistered
Global variable indicating whether the OGR library has been registered yet or not.
Definition: vtkGDALVectorReader.h:146
vtkGDALVectorReader::GetNumberOfLayers
int GetNumberOfLayers()
Return number of layers.
vtkGDALVectorReader::Implementation
vtkGDALVectorReader::Internal * Implementation
Private per-file metadata.
Definition: vtkGDALVectorReader.h:140
vtkGDALVectorReader::AppendFeatures
int AppendFeatures
Definition: vtkGDALVectorReader.h:137
vtkGDALVectorReader::FileName
char * FileName
The name of the file that will be opened on the next call to RequestData()
Definition: vtkGDALVectorReader.h:134
vtkGDALVectorReader::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkGDALVectorReader::GetLayersProjection
std::map< int, std::string > GetLayersProjection()
Return projection string belong to each layer.
vtkMultiBlockDataSetAlgorithm.h
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkGDALVectorReader::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkGDALVectorReader::LayersProjection
std::map< int, std::string > LayersProjection
Mapping of layer to projection.
Definition: vtkGDALVectorReader.h:149
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkGDALVectorReader::New
static vtkGDALVectorReader * New()
vtkGDALVectorReader::ActiveLayer
int ActiveLayer
Definition: vtkGDALVectorReader.h:136
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGDALVectorReader::InitializeInternal
int InitializeInternal()
vtkGDALVectorReader
Read vector file formats using GDAL.
Definition: vtkGDALVectorReader.h:42
vtkGDALVectorReader::~vtkGDALVectorReader
virtual ~vtkGDALVectorReader()
vtkGDALVectorReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:33