GDAL

gdalgeorefpamdataset.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: GDALPamDataset with internal storage for georeferencing, with
5 * priority for PAM over internal georeferencing
6 * Author: Even Rouault <even dot rouault at spatialys.com>
7 *
8 ******************************************************************************
9 * Copyright (c) 2013, Even Rouault <even dot rouault at spatialys.com>
10 *
11 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#ifndef GDAL_GEOREF_PAM_DATASET_H_INCLUDED
15#define GDAL_GEOREF_PAM_DATASET_H_INCLUDED
16
17#ifndef DOXYGEN_SKIP
18
19#include "gdal_pam.h"
20
21 class CPL_DLL GDALGeorefPamDataset : public GDALPamDataset
22{
23 protected:
24 bool bGeoTransformValid;
25 GDALGeoTransform m_gt{};
26 OGRSpatialReference m_oSRS{};
27 int nGCPCount;
28 GDAL_GCP *pasGCPList;
29 char **m_papszRPC;
30 bool m_bPixelIsPoint;
31
32 mutable int m_nGeoTransformGeorefSrcIndex;
33 int m_nGCPGeorefSrcIndex;
34 int m_nProjectionGeorefSrcIndex;
35 int m_nRPCGeorefSrcIndex;
36 int m_nPixelIsPointGeorefSrcIndex;
37
38 int GetPAMGeorefSrcIndex() const;
39 mutable bool m_bGotPAMGeorefSrcIndex;
40 mutable int m_nPAMGeorefSrcIndex;
41
42 bool m_bPAMLoaded;
43 char **m_papszMainMD;
44
45 CPL_DISALLOW_COPY_ASSIGN(GDALGeorefPamDataset)
46
47 public:
48 GDALGeorefPamDataset();
49 ~GDALGeorefPamDataset() override;
50
51 CPLErr TryLoadXML(CSLConstList papszSiblingFiles = nullptr) override;
52
53 CPLErr GetGeoTransform(GDALGeoTransform &gt) const override;
54
55 const OGRSpatialReference *GetSpatialRef() const override;
56
57 int GetGCPCount() override;
58 const OGRSpatialReference *GetGCPSpatialRef() const override;
59 const GDAL_GCP *GetGCPs() override;
60
61 char **GetMetadata(const char *pszDomain = "") override;
62 const char *GetMetadataItem(const char *pszName,
63 const char *pszDomain = "") override;
64 CPLErr SetMetadata(char **papszMetadata,
65 const char *pszDomain = "") override;
66 CPLErr SetMetadataItem(const char *pszName, const char *pszValue,
67 const char *pszDomain = "") override;
68};
69
70#endif /* #ifndef DOXYGEN_SKIP */
71
72#endif /* GDAL_GEOREF_PAM_DATASET_H_INCLUDED */
GDALGeoTransform
Class that encapsulates a geotransform matrix.
Definition gdal_geotransform.h:42
GDALPamDataset
PAM dataset.
Definition gdal_pam.h:120
GDALPamDataset::GetGCPCount
int GetGCPCount() override
Get number of GCPs.
Definition gdalpamdataset.cpp:1466
GDALPamDataset::GetGeoTransform
CPLErr GetGeoTransform(GDALGeoTransform &) const override
Fetch the affine transformation coefficients.
Definition gdalpamdataset.cpp:1410
GDALPamDataset::SetMetadata
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="") override
Set metadata.
Definition gdalpamdataset.cpp:1529
GDALPamDataset::GetMetadataItem
const char * GetMetadataItem(const char *pszName, const char *pszDomain="") override
Fetch single metadata item.
Definition gdalpamdataset.cpp:1567
GDALPamDataset::GetGCPSpatialRef
const OGRSpatialReference * GetGCPSpatialRef() const override
Get output spatial reference system for GCPs.
Definition gdalpamdataset.cpp:1479
GDALPamDataset::GetGCPs
const GDAL_GCP * GetGCPs() override
Fetch GCPs.
Definition gdalpamdataset.cpp:1492
GDALPamDataset::SetMetadataItem
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain="") override
Set single metadata item.
Definition gdalpamdataset.cpp:1547
GDALPamDataset::GetMetadata
char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
Definition gdalpamdataset.cpp:1635
GDALPamDataset::GetSpatialRef
const OGRSpatialReference * GetSpatialRef() const override
Fetch the spatial reference for this dataset.
Definition gdalpamdataset.cpp:1364
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
CPL_DISALLOW_COPY_ASSIGN
#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:936
CSLConstList
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1087
GDAL_GCP
Ground Control Point.
Definition gdal.h:1223