openModeller
Version 1.5.0
|
#include <request_file.hh>
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 |
Definition at line 47 of file request_file.hh.
RequestFile::RequestFile | ( | ) |
Class to read model creation/projection parameters from a request file and run om.
LICENSE INFORMATION
Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental
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.
|
private |
Definition at line 433 of file request_file.cpp.
References extractParameter(), AlgParamMetadata::id, AlgParameter::id(), AlgMetadata::nparam, AlgMetadata::param, AlgParameter::setId(), AlgParameter::setValue(), and AlgParamMetadata::typical.
Referenced by _setAlgorithm().
|
private |
Definition at line 348 of file request_file.cpp.
References _inputModelFile, _readParameters(), OpenModeller::algorithmMetadata(), Log::error(), FileParser::get(), FileParser::getAll(), AlgMetadata::id, Log::instance(), metadata, AlgMetadata::nparam, OpenModeller::setAlgorithm(), and Log::warn().
Referenced by configure().
|
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().
|
private |
Definition at line 124 of file request_file.cpp.
References _absences, _inputModelFile, _presences, OccurrencesFactory::create(), Log::error(), FileParser::get(), OccurrencesReader::getAbsences(), OccurrencesReader::getPresences(), Log::info(), Log::instance(), OccurrencesFactory::instance(), OpenModeller::setOccurrences(), and Log::warn().
Referenced by configure().
|
private |
Definition at line 259 of file request_file.cpp.
References _inputMask, _inputModelFile, _nonNativeProjection, _outputFormat, _outputMask, _projectionCategoricalMap, _projectionFile, _projectionMap, RasterFactory::create(), Log::error(), FileParser::get(), FileParser::getAll(), Raster::header(), Log::info(), Log::instance(), RasterFactory::instance(), MapFormat::setFormat(), MapFormat::setXMax(), MapFormat::setXMin(), MapFormat::setYMax(), MapFormat::setYMin(), Log::warn(), Header::xmax, Header::xmin, Header::ymax, and Header::ymin.
Referenced by configure().
|
inline |
|
inline |
Definition at line 72 of file request_file.hh.
References _calcAuc.
Referenced by main(), and makeModel().
|
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.
om | OpenModeller object to be configured. |
request_file | File from which the parameters will be read. |
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().
|
inline |
Definition at line 64 of file request_file.hh.
References _environmentSet.
|
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.
name | Name to be searched. |
vet | Vector of names. |
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().
void RequestFile::makeModel | ( | OpenModeller * | om | ) |
Definition at line 507 of file request_file.cpp.
References _environmentallyUnique, _inputModelFile, _outputModelFile, _spatiallyUnique, calcAuc(), calcConfusionMatrix(), OpenModeller::createModel(), Log::error(), OpenModeller::error(), OpenModeller::getConfusionMatrix(), OpenModeller::getModelConfiguration(), OpenModeller::getRocCurve(), OpenModeller::getSampler(), RocCurve::getTotalArea(), Log::info(), Log::instance(), Configuration::readXml(), OpenModeller::setModelConfiguration(), Log::warn(), and Configuration::writeXml().
Referenced by main().
void RequestFile::makeProjection | ( | OpenModeller * | om | ) |
Definition at line 594 of file request_file.cpp.
References _nonNativeProjection, _outputFormat, _outputMask, _projectionCategoricalMap, _projectionFile, _projectionMap, _projectionSet, createEnvironment(), OpenModeller::createMap(), Log::error(), and Log::instance().
Referenced by main().
|
inline |
|
inline |
Definition at line 65 of file request_file.hh.
References _projectionSet.
bool RequestFile::requestedProjection | ( | ) |
|
private |
Definition at line 108 of file request_file.hh.
Referenced by _setOccurrences(), and getAbsences().
|
private |
Definition at line 105 of file request_file.hh.
Referenced by algorithmSet(), and configure().
|
private |
Definition at line 124 of file request_file.hh.
Referenced by calcAuc(), and configure().
|
private |
Definition at line 123 of file request_file.hh.
Referenced by calcConfusionMatrix(), and configure().
|
private |
Definition at line 122 of file request_file.hh.
Referenced by configure(), and makeModel().
|
private |
Definition at line 103 of file request_file.hh.
Referenced by configure(), and environmentSet().
|
private |
Definition at line 113 of file request_file.hh.
Referenced by _setEnvironment(), and _setProjection().
|
private |
Definition at line 115 of file request_file.hh.
Referenced by _setAlgorithm(), _setEnvironment(), _setOccurrences(), _setProjection(), configure(), and makeModel().
|
private |
Definition at line 110 of file request_file.hh.
Referenced by _setProjection(), and makeProjection().
|
private |
Definition at line 102 of file request_file.hh.
Referenced by configure(), and occurrencesSet().
|
private |
Definition at line 119 of file request_file.hh.
Referenced by _setProjection(), and makeProjection().
|
private |
Definition at line 114 of file request_file.hh.
Referenced by _setProjection(), and makeProjection().
|
private |
Definition at line 116 of file request_file.hh.
Referenced by configure(), and makeModel().
|
private |
Definition at line 107 of file request_file.hh.
Referenced by _setOccurrences(), and getPresences().
|
private |
Definition at line 111 of file request_file.hh.
Referenced by _setProjection(), and makeProjection().
|
private |
Definition at line 117 of file request_file.hh.
Referenced by _setProjection(), makeProjection(), and requestedProjection().
|
private |
Definition at line 112 of file request_file.hh.
Referenced by _setProjection(), and makeProjection().
|
private |
Definition at line 104 of file request_file.hh.
Referenced by configure(), makeProjection(), and projectionSet().
|
private |
Definition at line 121 of file request_file.hh.
Referenced by configure(), and makeModel().