openModeller
Version 1.4.0
|
00001 00029 #ifndef _REQUEST_FILEHH_ 00030 #define _REQUEST_FILEHH_ 00031 00032 #include <openmodeller/AlgMetadata.hh> 00033 00034 #include <openmodeller/Occurrences.hh> 00035 #include <openmodeller/MapFormat.hh> 00036 00037 #include <string> 00038 #include <vector> 00039 00040 class OpenModeller; 00041 class FileParser; 00042 class AlgParameter; 00043 00044 /**************************************************************/ 00045 /************************ Request File ************************/ 00046 00047 class RequestFile 00048 { 00049 public: 00050 00051 RequestFile(); 00052 ~RequestFile(); 00053 00061 int configure( OpenModeller *om, char *request_file ); 00062 00063 int occurrencesSet() { return _occurrencesSet; } 00064 int environmentSet() { return _environmentSet; } 00065 int projectionSet() { return _projectionSet; } 00066 int algorithmSet() { return _algorithmSet; } 00067 00068 OccurrencesPtr getPresences(); 00069 OccurrencesPtr getAbsences(); 00070 00071 bool calcConfusionMatrix() { return _calcConfusionMatrix; } 00072 bool calcAuc() { return _calcAuc; } 00073 00074 bool requestedProjection(); 00075 00076 void makeModel( OpenModeller *om ); 00077 void makeProjection( OpenModeller *om ); 00078 00079 private: 00080 00081 int _setOccurrences( OpenModeller *om, FileParser &fp ); 00082 int _setEnvironment( OpenModeller *om, FileParser &fp ); 00083 int _setProjection ( OpenModeller *om, FileParser &fp ); 00084 int _setAlgorithm ( OpenModeller *om, FileParser &fp ); 00085 00086 int _readParameters( AlgParameter *result, AlgMetadata const *metadata, 00087 std::vector<std::string> str_param ); 00088 00099 std::string extractParameter( std::string const name, 00100 std::vector<std::string> vet ); 00101 00102 int _occurrencesSet; 00103 int _environmentSet; 00104 int _projectionSet; 00105 int _algorithmSet; 00106 00107 OccurrencesPtr _presences; 00108 OccurrencesPtr _absences; 00109 00110 bool _nonNativeProjection; 00111 std::vector<std::string> _projectionCategoricalMap; 00112 std::vector<std::string> _projectionMap; 00113 std::string _inputMask; 00114 std::string _outputMask; 00115 std::string _inputModelFile; 00116 std::string _outputModelFile; 00117 std::string _projectionFile; 00118 00119 MapFormat _outputFormat; 00120 00121 bool _spatiallyUnique; 00122 bool _environmentallyUnique; 00123 bool _calcConfusionMatrix; 00124 bool _calcAuc; 00125 00126 }; 00127 00128 00129 #endif 00130