-
Notifications
You must be signed in to change notification settings - Fork 0
/
aircraftApp.cpp
34 lines (26 loc) · 1014 Bytes
/
aircraftApp.cpp
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
#include "aircraftDetection.h"
int main(int argc, char*argv[])
{
GenTypes *genTypes = new GenTypes();
HandleInput handleInput(genTypes);
if (handleInput.parseArguments(argc, argv) == -1) return -1;
FilePathTools pathTool;
HandleShpFile shpHandle(handleInput.outPath() + "/aircrafts.shp");
std::string inFile;
std::vector<std::string> inFiles;
pathTool.GetFilesFromDir(handleInput.inPath138(), inFiles, "TIF");
CreateLineShp cLineShp(handleInput.outPath() + "/aircrafts_Border.shp");
// tmp
std::ofstream outf;
outf.open("resultFile.txt");
int totalFile = inFiles.size();
for (int fileNum = 0; fileNum < totalFile; ++fileNum)
{
inFile = inFiles[fileNum];
std::cout << "process: " << pathTool.GetFileName(inFile) << ", " << fileNum + 1 << " of " << totalFile << std::endl;
processOneSwath(outf, inFile, cLineShp, shpHandle, pathTool, *genTypes, handleInput.outPath(), handleInput.inPath21(), handleInput.inPathVapor());
}
cLineShp.closeShp();
shpHandle.closeShp();
outf.close();
}