GDAL

geoheif.h
1/******************************************************************************
2 * Project: GeoHEIF support class
3 * SPDX-License-Identifier: MIT
4 ****************************************************************************/
5
6#ifndef GEOHEIF_H_INCLUDED_
7#define GEOHEIF_H_INCLUDED_
8
9#include "gdal_pam.h"
10#include "ogr_spatialref.h"
11
12#include <vector>
13
15
16 namespace gdal
17{
18
19/*
20 * GeoHEIF support implementation.
21 *
22 * This class provides shared implementation for OGC GeoHEIF georeferencing,
23 * which is currently in draft (see OGC 24-038).
24 *
25 * GeoHEIF provides parsing and caching for spatial references, pixel
26 * to model affine transformation, and tie-points.
27 *
28 * This class is only shared here to provide common usage within
29 * AVIF and HEIF drivers. It is not intended to be a user-level API.
30*/
31 class CPL_DLL GeoHEIF final
32{
33 mutable OGRSpatialReference m_oSRS{};
34 double modelTransform[6] = {0.0};
35 bool haveGCPs = false;
36 std::vector<gdal::GCP> gcps;
37
38 public:
39 GeoHEIF();
40 ~GeoHEIF();
41
42 bool has_SRS() const;
43 bool has_GCPs() const;
44 const OGRSpatialReference *GetSpatialRef() const;
45 void setModelTransformation(const uint8_t *payload, size_t length);
46 CPLErr GetGeoTransform(GDALGeoTransform &gt) const;
47 void addGCPs(const uint8_t *payload, size_t length);
48 int GetGCPCount() const;
49 const GDAL_GCP *GetGCPs();
50 void extractSRS(const uint8_t *payload, size_t length) const;
51 const OGRSpatialReference *GetGCPSpatialRef() const;
52};
53
55
56} // namespace gdal
57
58#endif /* GEOHEIF_H_INCLUDED_ */
GDALGeoTransform
Class that encapsulates a geotransform matrix.
Definition gdal_geotransform.h:42
OGRSpatialReference
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:152
CPLErr
CPLErr
Error category.
Definition cpl_error.h:37
ogr_spatialref.h
Coordinate systems services.
GDAL_GCP
Ground Control Point.
Definition gdal.h:1223