gpcoord/CoordReader.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of gpcoord.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2009-06-19
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef COORDREADER_H
00028 #define COORDREADER_H
00029 
00030 #include <QGpCoreTools.h>
00031 #include <TapePositioningSystem.h>
00032 
00033 class CoordReader : public ArgumentStdinReader
00034 {
00035   TRANSLATIONS("CoordReader")
00036 public:
00037   CoordReader();
00038   ~CoordReader();
00039 
00040   bool setOptions(int& argc, char ** argv);
00041   bool hasInput() const;
00042   bool terminate();
00043 protected:
00044   virtual bool parse(QTextStream& s);
00045 private:
00046   enum Mode {None, Distance, DistanceLookup, DistanceGeo, Azimuth, AzimuthGeo, FromGeo, ToGeo, FromDMS, ToDMS, FromDM, ToDM,
00047              ToUTM, FromUTM, ToKML, FromKML, Translate, Rotate, Average, Localize, Lookup, TriangulateDistance, TriangulateAzimuth,
00048              FromDistances, GenerateCircle};
00049   Mode _mode;
00050   Point _geoReference;
00051   Point _cartReference;
00052   Angle _angle;
00053   Point _translateVector;
00054   Point _average;
00055   int _averageCount;
00056   QMap<QString, Point> _refPoints;
00057   QVector<Circle> _circles;
00058   QVector<Line2D> _lines;
00059   GoogleEarthKML * _kml;
00060   QString _kmlFileName;
00061   QPoint * _utmZone;
00062   QString _origin, _north, _eastward;
00063   double _distanceStddev, _priorPrecision;
00064   Triangulator _fromDistanceFactory;
00065 };
00066 
00067 #endif // COORDREADER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines