gooderp18绿色标准版
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

97 Zeilen
3.7KB

  1. /******************************************************************************
  2. * $Id: gdalgeorefpamdataset.h 8e5eeb35bf76390e3134a4ea7076dab7d478ea0e 2018-11-14 22:55:13 +0100 Even Rouault $
  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 mines-paris dot org>
  8. *
  9. ******************************************************************************
  10. * Copyright (c) 2013, Even Rouault <even dot rouault at mines-paris dot org>
  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. #ifndef GDAL_GEOREF_PAM_DATASET_H_INCLUDED
  31. #define GDAL_GEOREF_PAM_DATASET_H_INCLUDED
  32. #ifndef DOXYGEN_SKIP
  33. #include "gdal_pam.h"
  34. class CPL_DLL GDALGeorefPamDataset : public GDALPamDataset
  35. {
  36. protected:
  37. bool bGeoTransformValid;
  38. double adfGeoTransform[6];
  39. char *pszProjection;
  40. int nGCPCount;
  41. GDAL_GCP *pasGCPList;
  42. char** m_papszRPC;
  43. bool m_bPixelIsPoint;
  44. int m_nGeoTransformGeorefSrcIndex;
  45. int m_nGCPGeorefSrcIndex;
  46. int m_nProjectionGeorefSrcIndex;
  47. int m_nRPCGeorefSrcIndex;
  48. int m_nPixelIsPointGeorefSrcIndex;
  49. int GetPAMGeorefSrcIndex();
  50. bool m_bGotPAMGeorefSrcIndex;
  51. int m_nPAMGeorefSrcIndex;
  52. bool m_bPAMLoaded;
  53. char** m_papszMainMD;
  54. CPL_DISALLOW_COPY_ASSIGN(GDALGeorefPamDataset)
  55. public:
  56. GDALGeorefPamDataset();
  57. ~GDALGeorefPamDataset() override;
  58. CPLErr TryLoadXML(char **papszSiblingFiles = nullptr) override;
  59. CPLErr GetGeoTransform( double * ) override;
  60. const char *_GetProjectionRef(void) override;
  61. const OGRSpatialReference* GetSpatialRef() const override {
  62. return GetSpatialRefFromOldGetProjectionRef();
  63. }
  64. int GetGCPCount() override;
  65. const char *_GetGCPProjection() override;
  66. const OGRSpatialReference* GetGCPSpatialRef() const override {
  67. return GetGCPSpatialRefFromOldGetGCPProjection();
  68. }
  69. const GDAL_GCP *GetGCPs() override;
  70. char **GetMetadata( const char * pszDomain = "" ) override;
  71. const char *GetMetadataItem( const char * pszName,
  72. const char * pszDomain = "" ) override;
  73. CPLErr SetMetadata( char ** papszMetadata,
  74. const char * pszDomain = "" ) override;
  75. CPLErr SetMetadataItem( const char * pszName,
  76. const char * pszValue,
  77. const char * pszDomain = "" ) override;
  78. };
  79. #endif /* #ifndef DOXYGEN_SKIP */
  80. #endif /* GDAL_GEOREF_PAM_DATASET_H_INCLUDED */
上海开阖软件有限公司 沪ICP备12045867号-1