QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
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_core.h"
20#include "qgspointxy.h"
21
22#include <QObject>
23#include <QString>
24#include <QVariant>
25#include <QVariantMap>
26
32class CORE_EXPORT QgsExifTools
33{
34 Q_GADGET
35
36 public:
37
42 static QVariantMap readTags( const QString &imagePath );
43
48 static QVariant readTag( const QString &imagePath, const QString &key );
49
60 static QgsPoint getGeoTag( const QString &imagePath, bool &ok SIP_OUT );
61
67 Q_INVOKABLE static bool hasGeoTag( const QString &imagePath );
68
75 {
76 public:
77
79 : elevation( std::numeric_limits< double >::quiet_NaN() )
80 {
81 }
82
86 double elevation = 0;
87 };
88
100 static bool geoTagImage( const QString &imagePath, const QgsPointXY &location, const GeoTagDetails &details = QgsExifTools::GeoTagDetails() );
101
110 static bool tagImage( const QString &imagePath, const QString &tag, const QVariant &value );
111
112};
113
114#endif // QGSEXIFTOOLS_H
Extended image geotag details.
Definition: qgsexiftools.h:75
Contains utilities for working with EXIF tags in images.
Definition: qgsexiftools.h:33
A class to represent a 2D point.
Definition: qgspointxy.h:59
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:49
#define SIP_OUT
Definition: qgis_sip.h:58