QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
raster
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
32
class
CORE_EXPORT
QgsExifTools
33
{
34
Q_GADGET
35
36
public
:
41
static
QVariantMap
readTags
(
const
QString &imagePath );
42
47
static
QVariant
readTag
(
const
QString &imagePath,
const
QString &key );
48
59
static
QgsPoint
getGeoTag
(
const
QString &imagePath,
bool
&ok
SIP_OUT
);
60
66
Q_INVOKABLE
static
bool
hasGeoTag
(
const
QString &imagePath );
67
73
class
GeoTagDetails
74
{
75
public
:
76
GeoTagDetails
()
77
:
elevation
( std::numeric_limits< double >::quiet_NaN() )
78
{}
79
83
double
elevation
= 0;
84
};
85
97
static
bool
geoTagImage
(
const
QString &imagePath,
const
QgsPointXY
&location,
const
GeoTagDetails
&details =
QgsExifTools::GeoTagDetails
() );
98
107
static
bool
tagImage
(
const
QString &imagePath,
const
QString &tag,
const
QVariant &value );
108
};
109
110
#endif
// QGSEXIFTOOLS_H
QgsExifTools::GeoTagDetails
Extended image geotag details.
Definition
qgsexiftools.h:74
QgsExifTools::GeoTagDetails::elevation
double elevation
GPS elevation, or NaN if elevation is not available.
Definition
qgsexiftools.h:83
QgsExifTools::GeoTagDetails::GeoTagDetails
GeoTagDetails()
Definition
qgsexiftools.h:76
QgsExifTools
Contains utilities for working with EXIF tags in images.
Definition
qgsexiftools.h:33
QgsExifTools::readTags
static QVariantMap readTags(const QString &imagePath)
Returns a map object containing all exif tags stored in the image at imagePath.
Definition
qgsexiftools.cpp:338
QgsExifTools::getGeoTag
static QgsPoint getGeoTag(const QString &imagePath, bool &ok)
Returns the geotagged coordinate stored in the image at imagePath.
Definition
qgsexiftools.cpp:400
QgsExifTools::geoTagImage
static bool geoTagImage(const QString &imagePath, const QgsPointXY &location, const GeoTagDetails &details=QgsExifTools::GeoTagDetails())
Writes geotags to the image at imagePath.
Definition
qgsexiftools.cpp:474
QgsExifTools::hasGeoTag
static Q_INVOKABLE bool hasGeoTag(const QString &imagePath)
Returns true if the image at imagePath contains a valid geotag.
Definition
qgsexiftools.cpp:387
QgsExifTools::tagImage
static bool tagImage(const QString &imagePath, const QString &tag, const QVariant &value)
Writes a tag to the image at imagePath.
Definition
qgsexiftools.cpp:515
QgsExifTools::readTag
static QVariant readTag(const QString &imagePath, const QString &key)
Returns the value of an exif tag key stored in the image at imagePath.
Definition
qgsexiftools.cpp:291
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition
qgspoint.h:53
SIP_OUT
#define SIP_OUT
Definition
qgis_sip.h:57
qgspointxy.h
Generated on
for QGIS API Documentation by
1.17.0