DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
inputfileexporter.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
3 // AND EFFORT DISPLACEMENT
4 // Copyright (c) 2012-2019 Francois Bastardie <fba@aqua.dtu.dk>
5 
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // --------------------------------------------------------------------------
20 
21 /* --------------------------------------------------------------------------
22  * DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
23  * AND EFFORT DISPLACEMENT
24  * Copyright (c) 2012, 2013, 2014 Francois Bastardie <fba@aqua.dtu.dk>
25  *
26  * This program is free software; you can redistribute it and/or modify
27  * it under the terms of the GNU General Public License as published by
28  * the Free Software Foundation; either version 2 of the License, or
29  * (at your option) any later version.
30  *
31  * This program is distributed in the hope that it will be useful,
32  * but WITHOUT ANY WARRANTY; without even the implied warranty of
33  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34  * GNU General Public License for more details.
35  *
36  * You should have received a copy of the GNU General Public License along
37  * with this program; if not, write to the Free Software Foundation, Inc.,
38  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
39  * --------------------------------------------------------------------------
40  */
41 #ifndef INPUTFILEEXPORTER_H
42 #define INPUTFILEEXPORTER_H
43 
44 #include <QString>
45 
46 #include <vector>
47 #include <functional>
48 
49 class DisplaceModel;
50 
51 namespace displace {
52 class NodePenalty;
53 }
54 
55 QT_BEGIN_NAMESPACE
56 class QTextStream;
57 QT_END_NAMESPACE
58 
60 {
61 public:
63 
64  bool exportGraph(QString graphpath, QString coordspath, QString landpath, QString windpath, QString sstpath, QString salinitypath,
65  QString Nitrogenpath, QString Phosporuspath, QString Oxygenpath, QString DissolvedCarbonpath, QString bathymetrypath, QString shippingdensitypath,
66  QString siltfractionpath, QString benthospath, QString benthosnbpath, QString areacodepath,
67  QString closedpath, QString closedpath_month, QString closedpath_vessz, bool export_closedpoly, DisplaceModel *currentModel, QString *error);
68 protected:
69  bool outputClosedPolyFile(QString filename, DisplaceModel *currentModel,
70  std::function<bool(const displace::NodePenalty &)> selector,
71  std::function<std::vector<int>(const displace::NodePenalty &)> dataGetter,
72  QString *error);
73 };
74 
75 #endif // INPUTFILEEXPORTER_H
Definition: decisiontreemanager.h:13
bool exportGraph(QString graphpath, QString coordspath, QString landpath, QString windpath, QString sstpath, QString salinitypath, QString Nitrogenpath, QString Phosporuspath, QString Oxygenpath, QString DissolvedCarbonpath, QString bathymetrypath, QString shippingdensitypath, QString siltfractionpath, QString benthospath, QString benthosnbpath, QString areacodepath, QString closedpath, QString closedpath_month, QString closedpath_vessz, bool export_closedpoly, DisplaceModel *currentModel, QString *error)
Definition: inputfileexporter.cpp:31
Definition: displacemodel.h:71
Definition: nodepenalty.h:8
Definition: inputfileexporter.h:59
bool outputClosedPolyFile(QString filename, DisplaceModel *currentModel, std::function< bool(const displace::NodePenalty &)> selector, std::function< std::vector< int >(const displace::NodePenalty &)> dataGetter, QString *error)
Definition: inputfileexporter.cpp:399
InputFileExporter()
Definition: inputfileexporter.cpp:27