File indexing completed on 2023-10-03 07:01:06
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2016 Torsten Rahn <tackat@kde.org> 0004 // 0005 0006 0007 #include <QApplication> 0008 #include <QFileSystemModel> 0009 #include <QDebug> 0010 0011 #include <tileprocessor.h> 0012 0013 0014 int main(int argc, char *argv[]) 0015 { 0016 QString sourcefile; 0017 QString targetfile; 0018 0019 QApplication app(argc, argv); 0020 0021 qDebug( " sentineltile -o targetfile sourcefile" ); 0022 qDebug( " Syntax: pntreplace -d tileleveldirectory -m maskfile -b bathymetryfile " ); 0023 qDebug( " e.g. sentineltile -d /home/tackat/tilefab/sentinel2/14 " ); 0024 qDebug( " -m /home/tackat/bathymetry/coastline_mask.png " ); 0025 qDebug( " -b /home/tackat/bathymetry/bathymetry_equirect.jpg" ); 0026 // /home/tackat/tilefab/sentinel2/14 0027 QString tileDirPath; 0028 int tileDirIndex = app.arguments().indexOf("-d"); 0029 if (tileDirIndex > 0 && tileDirIndex + 1 < argc ) 0030 tileDirPath = app.arguments().at( tileDirIndex + 1 ); 0031 0032 // /home/tackat/bathymetry/coastline_mask.png 0033 QString coastLineMaskPath; 0034 int maskIndex = app.arguments().indexOf("-m"); 0035 if (maskIndex > 0 && maskIndex + 1 < argc ) 0036 coastLineMaskPath = app.arguments().at( maskIndex + 1 ); 0037 0038 // /home/tackat/bathymetry/bathymetry_equirect.jpg 0039 QString bathymetryPath; 0040 int bathymetryIndex = app.arguments().indexOf("-b"); 0041 if (bathymetryIndex > 0 && bathymetryIndex + 1 < argc ) 0042 bathymetryPath = app.arguments().at( bathymetryIndex + 1 ); 0043 0044 TileProcessor * tileProc = new TileProcessor(); 0045 0046 tileProc->parseFileList(tileDirPath); 0047 tileProc->loadReferenceImages(coastLineMaskPath, bathymetryPath); 0048 tileProc->process(); 0049 0050 app.exit(); 0051 }