GDAL
gdalgeorefpamdataset.h
1/******************************************************************************
2 * $Id$
3 *
4 * Project: GDAL
5 * Purpose: GDALPamDataset with internal storage for georeferencing, with
6 * priority for PAM over internal georeferencing
7 * Author: Even Rouault <even dot rouault at spatialys.com>
8 *
9 ******************************************************************************
10 * Copyright (c) 2013, Even Rouault <even dot rouault at spatialys.com>
11 *
12 * SPDX-License-Identifier: MIT
13 ****************************************************************************/
14
15#ifndef GDAL_GEOREF_PAM_DATASET_H_INCLUDED
16#define GDAL_GEOREF_PAM_DATASET_H_INCLUDED
17
18#ifndef DOXYGEN_SKIP
19
20#include "gdal_pam.h"
21
22class CPL_DLL GDALGeorefPamDataset : public GDALPamDataset
23{
24 protected:
25 bool bGeoTransformValid;
26 double adfGeoTransform[6];
27 OGRSpatialReference m_oSRS{};
28 int nGCPCount;
29 GDAL_GCP *pasGCPList;
30 char **m_papszRPC;
31 bool m_bPixelIsPoint;
32
33 int m_nGeoTransformGeorefSrcIndex;
34 int m_nGCPGeorefSrcIndex;
35 int m_nProjectionGeorefSrcIndex;
36 int m_nRPCGeorefSrcIndex;
37 int m_nPixelIsPointGeorefSrcIndex;
38
39 int GetPAMGeorefSrcIndex() const;
40 mutable bool m_bGotPAMGeorefSrcIndex;
41 mutable int m_nPAMGeorefSrcIndex;
42
43 bool m_bPAMLoaded;
44 char **m_papszMainMD;
45
46 CPL_DISALLOW_COPY_ASSIGN(GDALGeorefPamDataset)
47
48 public:
49 GDALGeorefPamDataset();
50 ~GDALGeorefPamDataset() override;
51
52 CPLErr TryLoadXML(CSLConstList papszSiblingFiles = nullptr) override;
53
54 CPLErr GetGeoTransform(double *) override;
55
56 const OGRSpatialReference *GetSpatialRef() const override;
57
58 int GetGCPCount() override;
59 const OGRSpatialReference *GetGCPSpatialRef() const override;
60 const GDAL_GCP *GetGCPs() override;
61
62 char **GetMetadata(const char *pszDomain = "") override;
63 const char *GetMetadataItem(const char *pszName,
64 const char *pszDomain = "") override;
65 CPLErr SetMetadata(char **papszMetadata,
66 const char *pszDomain = "") override;
67 CPLErr SetMetadataItem(const char *pszName, const char *pszValue,
68 const char *pszDomain = "") override;
69};
70
71#endif /* #ifndef DOXYGEN_SKIP */
72
73#endif /* GDAL_GEOREF_PAM_DATASET_H_INCLUDED */
PAM dataset.
Definition: gdal_pam.h:105
int GetGCPCount() override
Get number of GCPs.
Definition: gdalpamdataset.cpp:1443
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="") override
Set metadata.
Definition: gdalpamdataset.cpp:1506
const char * GetMetadataItem(const char *pszName, const char *pszDomain="") override
Fetch single metadata item.
Definition: gdalpamdataset.cpp:1544
const OGRSpatialReference * GetGCPSpatialRef() const override
Get output spatial reference system for GCPs.
Definition: gdalpamdataset.cpp:1456
const GDAL_GCP * GetGCPs() override
Fetch GCPs.
Definition: gdalpamdataset.cpp:1469
CPLErr GetGeoTransform(double *) override
Fetch the affine transformation coefficients.
Definition: gdalpamdataset.cpp:1385
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain="") override
Set single metadata item.
Definition: gdalpamdataset.cpp:1524
char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
Definition: gdalpamdataset.cpp:1607
const OGRSpatialReference * GetSpatialRef() const override
Fetch the spatial reference for this dataset.
Definition: gdalpamdataset.cpp:1352
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:153
CPLErr
Error category.
Definition: cpl_error.h:37
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:1030
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1179
Ground Control Point.
Definition: gdal.h:1168