Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
verdesroches committed Mar 7, 2016
0 parents commit 6cefba7
Show file tree
Hide file tree
Showing 24 changed files with 21,844 additions and 0 deletions.
20,250 changes: 20,250 additions & 0 deletions openaip_airspace_france_fr.aip

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions src/QOpenAip2Kml.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-02-21T13:30:58
#
#-------------------------------------------------

QT += core gui xml

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = QOpenAip2Kml
TEMPLATE = app


SOURCES += main.cpp\
qopenaip2kml.cpp \
aeronauticaldatahandler.cpp \
openaipfileparser.cpp \
kmlwriter.cpp \
appdatahandler.cpp

HEADERS += qopenaip2kml.h \
qopenaip2kmltypes.h \
aeronauticaldatahandler.h \
openaipfileparser.h \
kmlwriter.h \
appdatahandler.h

FORMS += qopenaip2kml.ui

DISTFILES += \
qopenaip2kml.rc

RC_FILE = qopenaip2kml.rc
91 changes: 91 additions & 0 deletions src/aeronauticaldatahandler.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/* This software is aimed to convert AIP files to KML file.
*
* 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 "aeronauticaldatahandler.h"

AeronauticalDataHandler::AeronauticalDataHandler(QObject *parent) : QObject(parent)
{

}

AeronauticalDataHandler::~AeronauticalDataHandler()
{

}

void AeronauticalDataHandler::addAirspace(TAirspace p_airspace)
{
airspaces.append(p_airspace);
}

const QVector<TAirspace> AeronauticalDataHandler::getAirspaces()
{
return airspaces;
}

QVector<TAirspace> AeronauticalDataHandler::getAirspace(TAirspaceCategory p_category)
{
QVector<TAirspace> airspaceByCategory;

for(int k = 0; k < airspaces.size() ; k++)
{
if(airspaces.at(k).category == p_category)
{
airspaceByCategory.append(airspaces.at(k));
}

}
return airspaceByCategory;
}

QString AeronauticalDataHandler::getGeometryAsString(QVector<TLatLon> p_latLon, int p_altitude)
{
QString geometry;

for(int k = 0 ; k < p_latLon.size() ; k++)
{
geometry.append(QString::number(p_latLon.at(k).longitude));
geometry.append(",");
geometry.append(QString::number(p_latLon.at(k).latitude));
geometry.append(",");
geometry.append(QString::number(p_altitude));
geometry.append(" ");
}

return geometry;
}

QString AeronauticalDataHandler::getGeometryAsStringWithoutAltitude(QVector<TLatLon> p_latLon)
{
QString geometry;

for(int k = 0 ; k < p_latLon.size() ; k++)
{
geometry.append(QString::number(p_latLon.at(k).longitude));
geometry.append(",");
geometry.append(QString::number(p_latLon.at(k).latitude));
geometry.append(" ");
}

return geometry;
}

void AeronauticalDataHandler::clean()
{
airspaces.clear();
}


46 changes: 46 additions & 0 deletions src/aeronauticaldatahandler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* This software is aimed to convert AIP files to KML file.
*
* 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/>.
*/

#ifndef AERONAUTICALDATAHANDLER_H
#define AERONAUTICALDATAHANDLER_H

#include <QObject>
#include <QVector>
#include <QDebug>
#include <qopenaip2kmltypes.h>

class AeronauticalDataHandler : public QObject
{
Q_OBJECT
public:
explicit AeronauticalDataHandler(QObject *parent = 0);
~AeronauticalDataHandler();
void addAirspace(TAirspace p_airspace);
void clean();
const QVector<TAirspace> getAirspaces();
QVector<TAirspace> getAirspace(TAirspaceCategory p_category);
static QString getGeometryAsString(QVector<TLatLon> p_latLon, int p_altitude);
static QString getGeometryAsStringWithoutAltitude(QVector<TLatLon> p_latLon);

signals:

public slots:

private:
QVector<TAirspace> airspaces;
};

#endif // AERONAUTICALDATAHANDLER_H
22 changes: 22 additions & 0 deletions src/appdatahandler.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* This software is aimed to convert AIP files to KML file.
*
* 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 "appdatahandler.h"

AppDataHandler::AppDataHandler(QObject *parent) : QObject(parent)
{

}
41 changes: 41 additions & 0 deletions src/appdatahandler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* This software is aimed to convert AIP files to KML file.
*
* 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/>.
*/

#ifndef APPDATAHANDLER_H
#define APPDATAHANDLER_H

#include <QObject>

enum TErrorLevel
{
TErrorLevel_NOERROR,
TErrorLevel_CONTINUE,
TErrorLevel_STOP
};

class AppDataHandler : public QObject
{
Q_OBJECT
public:
explicit AppDataHandler(QObject *parent = 0);

signals:

public slots:

};

#endif // APPDATAHANDLER_H
Binary file added src/icons/icon.ico
Binary file not shown.
Binary file added src/icons/icon_high.ico
Binary file not shown.
Binary file added src/icons/icon_low.ico
Binary file not shown.
Binary file added src/icons/icon_low2.ico
Binary file not shown.
Binary file added src/img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/img/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6cefba7

Please sign in to comment.