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 =========================================================================*/
00032 #ifndef __vtkGDALVectorReader_h
00033 #define __vtkGDALVectorReader_h
00034 
00035 #include <vtkMultiBlockDataSetAlgorithm.h>
00036 #include <vtkIOGDALModule.h> // For export macro
00037 
00038 #include <map> // STL required.
00039 
00040 class VTKIOGDAL_EXPORT vtkGDALVectorReader : public vtkMultiBlockDataSetAlgorithm
00041 {
00042 public:
00043   static vtkGDALVectorReader* New();
00044   virtual void PrintSelf( ostream& os, vtkIndent indent );
00045   vtkTypeMacro(vtkGDALVectorReader,vtkMultiBlockDataSetAlgorithm);
00046 
00047   vtkSetStringMacro(FileName);
00048   vtkGetStringMacro(FileName);
00049 
00051   int GetNumberOfLayers();
00052 
00054   int GetLayerType(int layerIndex=0);
00055 
00057   int GetFeatureCount(int layerIndex=0);
00058 
00060   int GetActiveLayerType();
00061 
00063   int GetActiveLayerFeatureCount();
00064 
00066 
00069   vtkSetMacro(ActiveLayer,int);
00070   vtkGetMacro(ActiveLayer,int);
00072 
00074 
00077   vtkSetMacro(AppendFeatures, int);
00078   vtkGetMacro(AppendFeatures, int);
00079   vtkBooleanMacro(AppendFeatures, int);
00081 
00082   //BTX
00084 
00085   std::map<int, std::string> GetLayersProjection();
00086   //ETX
00088 
00090   const char* GetLayerProjection(int layerIndex);
00091 
00093 
00099   vtkSetMacro(AddFeatureIds,int);
00100   vtkGetMacro(AddFeatureIds,int);
00101   vtkBooleanMacro(AddFeatureIds,int);
00103 
00104 protected:
00105   vtkGDALVectorReader();
00106   virtual ~vtkGDALVectorReader();
00107 
00108   int RequestInformation( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00109   int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00110 
00111   int InitializeInternal();
00112 
00114   char* FileName;
00115 
00116   int ActiveLayer;
00117   int AppendFeatures;
00118   int AddFeatureIds;
00119 
00120   //BTX
00121   class Internal;
00122 
00124   vtkGDALVectorReader::Internal* Implementation;
00125 
00127   static int OGRRegistered;
00128 
00130   std::map<int, std::string> LayersProjection;
00131   //ETX
00132 
00133 private:
00134   vtkGDALVectorReader(const vtkGDALVectorReader&);  // Not implemented.
00135   void operator=(const vtkGDALVectorReader&);       // Not implemented.
00136 };
00137 
00138 #endif // __vtkGDALVectorReader_h