GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- File List
- File Members

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 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 ****************************************************************************/
30
31 #ifndef GDAL_GEOREF_PAM_DATASET_H_INCLUDED
32 #define GDAL_GEOREF_PAM_DATASET_H_INCLUDED
33
34 #ifndef DOXYGEN_SKIP
35
36 #include "gdal_pam.h"
37
38 class CPL_DLL GDALGeorefPamDataset : public GDALPamDataset
39 {
40 protected:
41 bool bGeoTransformValid;
42 double adfGeoTransform[6];
43 char *pszProjection;
44 int nGCPCount;
45 GDAL_GCP *pasGCPList;
46 char** m_papszRPC;
47 bool m_bPixelIsPoint;
48
49 int m_nGeoTransformGeorefSrcIndex;
50 int m_nGCPGeorefSrcIndex;
51 int m_nProjectionGeorefSrcIndex;
52 int m_nRPCGeorefSrcIndex;
53 int m_nPixelIsPointGeorefSrcIndex;
54
55 int GetPAMGeorefSrcIndex();
56 bool m_bGotPAMGeorefSrcIndex;
57 int m_nPAMGeorefSrcIndex;
58
59 bool m_bPAMLoaded;
60 char** m_papszMainMD;
61
62 CPL_DISALLOW_COPY_ASSIGN(GDALGeorefPamDataset)
63
64 public:
65 GDALGeorefPamDataset();
66 ~GDALGeorefPamDataset() override;
67
68 CPLErr TryLoadXML(char **papszSiblingFiles = nullptr) override;
69
70 CPLErr GetGeoTransform( double * ) override;
71
72 const char *_GetProjectionRef(void) override;
73 const OGRSpatialReference* GetSpatialRef() const override {
74 return GetSpatialRefFromOldGetProjectionRef();
75 }
76
77 int GetGCPCount() override;
78 const char *_GetGCPProjection() override;
79 const OGRSpatialReference* GetGCPSpatialRef() const override {
80 return GetGCPSpatialRefFromOldGetGCPProjection();
81 }
82 const GDAL_GCP *GetGCPs() override;
83
84 char **GetMetadata( const char * pszDomain = "" ) override;
85 const char *GetMetadataItem( const char * pszName,
86 const char * pszDomain = "" ) override;
87 CPLErr SetMetadata( char ** papszMetadata,
88 const char * pszDomain = "" ) override;
89 CPLErr SetMetadataItem( const char * pszName,
90 const char * pszValue,
91 const char * pszDomain = "" ) override;
92 };
93
94 #endif /* #ifndef DOXYGEN_SKIP */
95
96 #endif /* GDAL_GEOREF_PAM_DATASET_H_INCLUDED */
GDALPamDataset::GetGCPs
const GDAL_GCP * GetGCPs() override
Fetch GCPs.
Definition: gdalpamdataset.cpp:1299
GDALPamDataset::SetMetadataItem
CPLErr SetMetadataItem(const char *pszName, const char *pszValue, const char *pszDomain="") override
Set single metadata item.
Definition: gdalpamdataset.cpp:1363
GDALPamDataset
PAM dataset.
Definition: gdal_pam.h:114
OGRSpatialReference
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:157
GDALPamDataset::GetGCPSpatialRef
const OGRSpatialReference * GetGCPSpatialRef() const override
Get output spatial reference system for GCPs.
Definition: gdalpamdataset.cpp:1286
GDALPamDataset::GetGCPCount
int GetGCPCount() override
Get number of GCPs.
Definition: gdalpamdataset.cpp:1273
GDALPamDataset::GetMetadataItem
const char * GetMetadataItem(const char *pszName, const char *pszDomain="") override
Fetch single metadata item.
Definition: gdalpamdataset.cpp:1383
GDALPamDataset::SetMetadata
CPLErr SetMetadata(char **papszMetadata, const char *pszDomain="") override
Set metadata.
Definition: gdalpamdataset.cpp:1344
GDALPamDataset::GetMetadata
char ** GetMetadata(const char *pszDomain="") override
Fetch metadata.
Definition: gdalpamdataset.cpp:1447
GDAL_GCP
Ground Control Point.
Definition: gdal.h:660
CPLErr
CPLErr
Error category.
Definition: cpl_error.h:52
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:1003