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 =========================================================================*/
32 #ifndef vtkGDALVectorReader_h
33 #define vtkGDALVectorReader_h
34 
36 #include "vtkIOGDALModule.h" // For export macro
37 
38 #include <map> // STL required.
39 
40 class VTKIOGDAL_EXPORT vtkGDALVectorReader : public vtkMultiBlockDataSetAlgorithm
41 {
42 public:
43  static vtkGDALVectorReader* New();
44  virtual void PrintSelf( ostream& os, vtkIndent indent );
46 
47  vtkSetStringMacro(FileName);
48  vtkGetStringMacro(FileName);
49 
51  int GetNumberOfLayers();
52 
54  int GetLayerType(int layerIndex=0);
55 
57  int GetFeatureCount(int layerIndex=0);
58 
60  int GetActiveLayerType();
61 
63  int GetActiveLayerFeatureCount();
64 
66 
69  vtkSetMacro(ActiveLayer,int);
70  vtkGetMacro(ActiveLayer,int);
72 
74 
77  vtkSetMacro(AppendFeatures, int);
78  vtkGetMacro(AppendFeatures, int);
79  vtkBooleanMacro(AppendFeatures, int);
81 
82  //BTX
84 
85  std::map<int, std::string> GetLayersProjection();
86  //ETX
88 
90  const char* GetLayerProjection(int layerIndex);
91 
93 
99  vtkSetMacro(AddFeatureIds,int);
100  vtkGetMacro(AddFeatureIds,int);
101  vtkBooleanMacro(AddFeatureIds,int);
103 
104 protected:
106  virtual ~vtkGDALVectorReader();
107 
110 
111  int InitializeInternal();
112 
114  char* FileName;
115 
119 
120  //BTX
121  class Internal;
122 
124  vtkGDALVectorReader::Internal* Implementation;
125 
127  static int OGRRegistered;
128 
130  std::map<int, std::string> LayersProjection;
131  //ETX
132 
133 private:
134  vtkGDALVectorReader(const vtkGDALVectorReader&); // Not implemented.
135  void operator=(const vtkGDALVectorReader&); // Not implemented.
136 };
137 
138 #endif // vtkGDALVectorReader_h
char * FileName
The name of the file that will be opened on the next call to RequestData()
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkMultiBlockDataSetAlgorithm * New()
vtkGDALVectorReader::Internal * Implementation
Private per-file metadata.
a simple class to control print indentation
Definition: vtkIndent.h:38
Read vector file formats using GDAL.
static int OGRRegistered
Global variable indicating whether the OGR library has been registered yet or not.
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
std::map< int, std::string > LayersProjection
Mapping of layer to projection.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)