VTK
dox/IO/GDAL/vtkGDALVectorReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGDALVectorReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00029 #ifndef __vtkGDALVectorReader_h
00030 #define __vtkGDALVectorReader_h
00031 
00032 #include <vtkMultiBlockDataSetAlgorithm.h>
00033 #include <vtkIOGDALModule.h> // For export macro
00034 
00035 #include <map> // STL required.
00036 
00037 class VTKIOGDAL_EXPORT vtkGDALVectorReader : public vtkMultiBlockDataSetAlgorithm
00038 {
00039 public:
00040   static vtkGDALVectorReader* New();
00041   virtual void PrintSelf( ostream& os, vtkIndent indent );
00042   vtkTypeMacro(vtkGDALVectorReader,vtkMultiBlockDataSetAlgorithm);
00043 
00044   vtkSetStringMacro(FileName);
00045   vtkGetStringMacro(FileName);
00046 
00048   int GetNumberOfLayers();
00049 
00051   int GetLayerType(int layerIndex=0);
00052 
00054   int GetFeatureCount(int layerIndex=0);
00055 
00057   int GetActiveLayerType();
00058 
00060   int GetActiveLayerFeatureCount();
00061 
00063 
00064   vtkSetMacro(ActiveLayer,int);
00065   vtkGetMacro(ActiveLayer,int);
00067 
00069 
00072   vtkSetMacro(AppendFeatures, int);
00073   vtkGetMacro(AppendFeatures, int);
00074   vtkBooleanMacro(AppendFeatures, int);
00076 
00077   //BTX
00079 
00080   std::map<int, std::string> GetLayersProjection();
00081   //ETX
00083 
00085   const char* GetLayerProjection(int layerIndex);
00086 
00087 protected:
00088   vtkGDALVectorReader();
00089   virtual ~vtkGDALVectorReader();
00090 
00091   int RequestInformation( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00092   int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00093 
00094   int InitializeInternal();
00095 
00097   char* FileName;
00098 
00099   int ActiveLayer;
00100   int AppendFeatures;
00101 
00102   //BTX
00103   class Internal;
00104 
00106   vtkGDALVectorReader::Internal* Implementation;
00107 
00109   static int OGRRegistered;
00110 
00112   std::map<int, std::string> LayersProjection;
00113   //ETX
00114 
00115 private:
00116   vtkGDALVectorReader(const vtkGDALVectorReader&);  // Not implemented.
00117   void operator=(const vtkGDALVectorReader&);       // Not implemented.
00118 };
00119 
00120 #endif // __vtkGDALVectorReader_h