-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
71 lines (57 loc) · 2.47 KB
/
Copy pathmain.cpp
File metadata and controls
71 lines (57 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
Part of the code of the SPatial Ontology Reasoner designed to reason over multi-scale GEOBIA Ontologies, as described in the following paper:
Argyridis A., Argialas, D., 2015. A Fuzzy Spatial Reasoner for Multi-Scale GEOBIA Ontologies, Photogrammetric Engineering and Remote Sesing, 41-48
Copyright (C) 2015 Argyros Argyridis
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 3 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.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <ctime>
#include <iostream>
#include "fuzzyevaluator/fuzzyevaluator.hxx"
#include "ontologyclass/ontologyclass.hxx"
#include "ontologycontainer/ontologycontainer.hxx"
#include "ontologyparser/ontologyparser.hxx"
using namespace std;
void help();
int main ( int argc, const char* argv[] ) {
//data required for the connection
string cn, fileName, dbName="dbname=", hostName, userName, password, schema, thingTable;
//container to store information regarding the ontology
OntologyParserPtr parser;
OntologyDataPtr ontoData;
OntologyContainerPtr ontoClassifier;
FuzzyEvaluatorPtr eval;
//time_t tm0 = time(0);
if (argc < 7) {
cout <<"not enough parameters\n";
help();
return 1;
}
fileName = argv[1];
dbName += argv[2];
hostName = argv[3];
userName = argv[4];
password = argv[5];
schema = argv[6];
thingTable = argv[7];
cn = dbName +" host="+ hostName + " user="+ userName + " password="+ password;
parser = OntologyParserPtr ( new OntologyParser( fileName, cn, schema, thingTable ) );
ontoData = parser->getOntologyData();
ontoClassifier = OntologyContainerPtr ( new OntologyContainer ( ontoData, true, false ) );
eval = FuzzyEvaluatorPtr(new FuzzyEvaluator ( ontoData ));
eval->bestClassificationResult();
eval->classificationStability();
xmlCleanupMemory();
return 0;
}
void help() {
cout<<"Parameter list: ontology_file database_name host_name user_name password schema thing_table\n";
}