QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsexiftools.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgisexiftools.h
3  ---------------
4  Date : November 2018
5  Copyright : (C) 2018 by Nyall Dawson
6  Email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSEXIFTOOLS_H
17 #define QGSEXIFTOOLS_H
18 
19 #include "qgis_analysis.h"
20 #include "qgspointxy.h"
21 
22 #include <QObject>
23 #include <QString>
24 #include <QVariant>
25 #include <QVariantMap>
26 
32 class ANALYSIS_EXPORT QgsExifTools
33 {
34  Q_GADGET
35 
36  public:
37 
38 #if 0
39  static QVariantMap readTags( const QString &imagePath );
40 #endif
41 
52  static QgsPoint getGeoTag( const QString &imagePath, bool &ok SIP_OUT );
53 
59  Q_INVOKABLE static bool hasGeoTag( const QString &imagePath );
60 
67  {
68  public:
69 
71  : elevation( std::numeric_limits< double >::quiet_NaN() )
72  {
73  }
74 
78  double elevation = 0;
79  };
80 
92  static bool geoTagImage( const QString &imagePath, const QgsPointXY &location, const GeoTagDetails &details = QgsExifTools::GeoTagDetails() );
93 };
94 
95 #endif // QGSEXIFTOOLS_H
QgsExifTools::GeoTagDetails::GeoTagDetails
GeoTagDetails()
Definition: qgsexiftools.h:70
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:38
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:44
QgsExifTools
Contains utilities for working with EXIF tags in images.
Definition: qgsexiftools.h:33
qgspointxy.h
QgsExifTools::GeoTagDetails
Extended image geotag details.
Definition: qgsexiftools.h:67