openModeller  Version 1.5.0
RequestFile Class Reference

#include <request_file.hh>

Collaboration diagram for RequestFile:
Collaboration graph

Public Member Functions

 RequestFile ()
 
 ~RequestFile ()
 
int configure (OpenModeller *om, char *request_file)
 
int occurrencesSet ()
 
int environmentSet ()
 
int projectionSet ()
 
int algorithmSet ()
 
OccurrencesPtr getPresences ()
 
OccurrencesPtr getAbsences ()
 
bool calcConfusionMatrix ()
 
bool calcAuc ()
 
bool requestedProjection ()
 
void makeModel (OpenModeller *om)
 
void makeProjection (OpenModeller *om)
 

Private Member Functions

int _setOccurrences (OpenModeller *om, FileParser &fp)
 
int _setEnvironment (OpenModeller *om, FileParser &fp)
 
int _setProjection (OpenModeller *om, FileParser &fp)
 
int _setAlgorithm (OpenModeller *om, FileParser &fp)
 
int _readParameters (AlgParameter *result, AlgMetadata const *metadata, std::vector< std::string > str_param)
 
std::string extractParameter (std::string const name, std::vector< std::string > vet)
 

Private Attributes

int _occurrencesSet
 
int _environmentSet
 
int _projectionSet
 
int _algorithmSet
 
OccurrencesPtr _presences
 
OccurrencesPtr _absences
 
bool _nonNativeProjection
 
std::vector< std::string > _projectionCategoricalMap
 
std::vector< std::string > _projectionMap
 
std::string _inputMask
 
std::string _outputMask
 
std::string _inputModelFile
 
std::string _outputModelFile
 
std::string _projectionFile
 
MapFormat _outputFormat
 
bool _spatiallyUnique
 
bool _environmentallyUnique
 
bool _calcConfusionMatrix
 
bool _calcAuc
 

Detailed Description

Definition at line 47 of file request_file.hh.

Constructor & Destructor Documentation

RequestFile::RequestFile ( )

Class to read model creation/projection parameters from a request file and run om.

Author
Mauro E S Muņoz (mauro.nosp@m.@cri.nosp@m.a.org.nosp@m..br)
Date
2004-06-22
Id:
request_file.cpp 5767 2013-07-16 17:25:12Z rdg

LICENSE INFORMATION

Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html

Definition at line 41 of file request_file.cpp.

RequestFile::~RequestFile ( )

Definition at line 63 of file request_file.cpp.

Member Function Documentation

int RequestFile::_readParameters ( AlgParameter result,
AlgMetadata const *  metadata,
std::vector< std::string >  str_param 
)
private
int RequestFile::_setAlgorithm ( OpenModeller om,
FileParser fp 
)
private
int RequestFile::_setEnvironment ( OpenModeller om,
FileParser fp 
)
private

Definition at line 209 of file request_file.cpp.

References _inputMask, _inputModelFile, Log::error(), FileParser::get(), FileParser::getAll(), Log::info(), Log::instance(), OpenModeller::setEnvironment(), and Log::warn().

Referenced by configure().

Here is the call graph for this function:

int RequestFile::algorithmSet ( )
inline

Definition at line 66 of file request_file.hh.

References _algorithmSet.

Referenced by main().

bool RequestFile::calcAuc ( )
inline

Definition at line 72 of file request_file.hh.

References _calcAuc.

Referenced by main(), and makeModel().

bool RequestFile::calcConfusionMatrix ( )
inline

Definition at line 71 of file request_file.hh.

References _calcConfusionMatrix.

Referenced by main(), and makeModel().

int RequestFile::configure ( OpenModeller om,
char *  request_file 
)

Loads parameters from the request file.

Parameters
omOpenModeller object to be configured.
request_fileFile from which the parameters will be read.
Returns
Number of parameters missing in the request file.

Definition at line 70 of file request_file.cpp.

References _algorithmSet, _calcAuc, _calcConfusionMatrix, _environmentallyUnique, _environmentSet, _inputModelFile, _occurrencesSet, _outputModelFile, _projectionSet, _setAlgorithm(), _setEnvironment(), _setOccurrences(), _setProjection(), _spatiallyUnique, and FileParser::get().

Referenced by main().

Here is the call graph for this function:

int RequestFile::environmentSet ( )
inline

Definition at line 64 of file request_file.hh.

References _environmentSet.

std::string RequestFile::extractParameter ( std::string const  name,
std::vector< std::string >  vet 
)
private

Search for 'name' in the 'nvet' elements of the vector 'vet'. If the string 'name' is in the beginning of some string vet[i] then returns a pointer to the next character of vet[i], otherwise returns 0.

Parameters
nameName to be searched.
vetVector of names.
Returns
Pointer to the next character of matching vector element.

Definition at line 466 of file request_file.cpp.

Referenced by _readParameters().

OccurrencesPtr RequestFile::getAbsences ( )

Definition at line 425 of file request_file.cpp.

References _absences.

OccurrencesPtr RequestFile::getPresences ( )

Definition at line 411 of file request_file.cpp.

References _presences, Log::error(), and Log::instance().

Here is the call graph for this function:

void RequestFile::makeProjection ( OpenModeller om)
int RequestFile::occurrencesSet ( )
inline

Definition at line 63 of file request_file.hh.

References _occurrencesSet.

Referenced by main().

int RequestFile::projectionSet ( )
inline

Definition at line 65 of file request_file.hh.

References _projectionSet.

bool RequestFile::requestedProjection ( )

Definition at line 499 of file request_file.cpp.

References _projectionFile.

Referenced by main().

Member Data Documentation

OccurrencesPtr RequestFile::_absences
private

Definition at line 108 of file request_file.hh.

Referenced by _setOccurrences(), and getAbsences().

int RequestFile::_algorithmSet
private

Definition at line 105 of file request_file.hh.

Referenced by algorithmSet(), and configure().

bool RequestFile::_calcAuc
private

Definition at line 124 of file request_file.hh.

Referenced by calcAuc(), and configure().

bool RequestFile::_calcConfusionMatrix
private

Definition at line 123 of file request_file.hh.

Referenced by calcConfusionMatrix(), and configure().

bool RequestFile::_environmentallyUnique
private

Definition at line 122 of file request_file.hh.

Referenced by configure(), and makeModel().

int RequestFile::_environmentSet
private

Definition at line 103 of file request_file.hh.

Referenced by configure(), and environmentSet().

std::string RequestFile::_inputMask
private

Definition at line 113 of file request_file.hh.

Referenced by _setEnvironment(), and _setProjection().

std::string RequestFile::_inputModelFile
private
bool RequestFile::_nonNativeProjection
private

Definition at line 110 of file request_file.hh.

Referenced by _setProjection(), and makeProjection().

int RequestFile::_occurrencesSet
private

Definition at line 102 of file request_file.hh.

Referenced by configure(), and occurrencesSet().

MapFormat RequestFile::_outputFormat
private

Definition at line 119 of file request_file.hh.

Referenced by _setProjection(), and makeProjection().

std::string RequestFile::_outputMask
private

Definition at line 114 of file request_file.hh.

Referenced by _setProjection(), and makeProjection().

std::string RequestFile::_outputModelFile
private

Definition at line 116 of file request_file.hh.

Referenced by configure(), and makeModel().

OccurrencesPtr RequestFile::_presences
private

Definition at line 107 of file request_file.hh.

Referenced by _setOccurrences(), and getPresences().

std::vector<std::string> RequestFile::_projectionCategoricalMap
private

Definition at line 111 of file request_file.hh.

Referenced by _setProjection(), and makeProjection().

std::string RequestFile::_projectionFile
private

Definition at line 117 of file request_file.hh.

Referenced by _setProjection(), makeProjection(), and requestedProjection().

std::vector<std::string> RequestFile::_projectionMap
private

Definition at line 112 of file request_file.hh.

Referenced by _setProjection(), and makeProjection().

int RequestFile::_projectionSet
private

Definition at line 104 of file request_file.hh.

Referenced by configure(), makeProjection(), and projectionSet().

bool RequestFile::_spatiallyUnique
private

Definition at line 121 of file request_file.hh.

Referenced by configure(), and makeModel().


The documentation for this class was generated from the following files: