1 #include <QtWidgets/QApplication>
5 #include "mainwindow.h"
7 int main(
int argc,
char *argv[])
9 QApplication a(argc, argv);
14 QRegExp rbound(
"(-b=)(-?\\d+\\.?\\d*)(,)(-?\\d+\\.?\\d*)(,)(-?\\d+\\.?\\d*)(,)(-?\\d+\\.?\\d*)");
15 QRegExp rpngdest(
"(-m=)(\\d+)(,)(\\d+)(,)(.+)");
16 QRegExp rbtpdest(
"(-d=)(.+)");
17 QRegExp rosmread(
"(-r=)(.+)");
18 QRegExp rbtpCA(
"(-a=)(.+)");
19 double minlat = -90., maxlat = 90., minlon = -180., maxlon = 180.;
21 for(
int i = 1; i < argc; i++){
23 if(rosmread.indexIn(argv[i])==0){
25 w.read_osm(rosmread.cap(2));
28 if(rbtpdest.indexIn(argv[i])==0){
30 w.save_btp(rbtpdest.cap(2),minlat,maxlat,minlon,maxlon);
33 if(rpngdest.indexIn(argv[i])==0){
36 mt.settings(&(w.c.MS));
37 mt.resize(rpngdest.cap(2).toInt(),rpngdest.cap(4).toInt());
38 mt.set_borders(minlat,maxlat,minlon,maxlon);
40 mt.draw_map(NULL,NULL,NULL,0);
41 mt.save_to_png(rpngdest.cap(6));
44 if(rbtpCA.indexIn(argv[i])==0){
48 QString projectname = QDir(rbtpCA.cap(2)).dirName();
49 CA.set_brect(minlat,maxlat,minlon,maxlon);
50 CA.create_html(projectname.toLocal8Bit().data(),
51 rbtpCA.cap(2).toLocal8Bit().data());
54 if(rbound.indexIn(argv[i])==0){
56 minlon = rbound.cap(2).toDouble();
57 minlat = rbound.cap(4).toDouble();
58 maxlon = rbound.cap(6).toDouble();
59 maxlat = rbound.cap(8).toDouble();
62 if(QString(argv[i])==
"close"){
67 if(QFileInfo(QString(argv[i])).suffix()==
"btp"){
69 w.load_btp(QString(argv[i]));
72 if(QFileInfo(QString(argv[i])).suffix()==
"gpx"){
74 w.analyse_gpx(QString(argv[1]));
77 if(QFileInfo(QString(argv[i])).suffix()==
"osm"){
84 QMessageBox(QMessageBox::NoIcon,
"Unknown argument",argv[i]).exec();
double minP
climb analyse dialog
char maxtype
way restrictions
extracts climbs from street network and provides climblayer handling
double minHM
climb analyse dialog
double minS
climb analyse dialog
double maxdwnHM
climb analyse dialog