From 921464c26a02077a5e9ffbe7a4efd49fccc08f6c Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@orfeo-toolbox.org>
Date: Fri, 24 Jun 2011 16:55:34 +0200
Subject: [PATCH] ENH: Adding a missing const getter on GCPs

---
 Code/IO/otbImage.h   | 1 +
 Code/IO/otbImage.txx | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/Code/IO/otbImage.h b/Code/IO/otbImage.h
index 696c5cbb5d..919f8cc31f 100644
--- a/Code/IO/otbImage.h
+++ b/Code/IO/otbImage.h
@@ -145,6 +145,7 @@ public:
   virtual unsigned int GetGCPCount(void) const;
 
   virtual OTB_GCP& GetGCPs(unsigned int GCPnum);
+  virtual const OTB_GCP& GetGCPs(unsigned int GCPnum) const;
 
   virtual std::string GetGCPId(unsigned int GCPnum) const;
   virtual std::string GetGCPInfo(unsigned int GCPnum) const;
diff --git a/Code/IO/otbImage.txx b/Code/IO/otbImage.txx
index 4189ef8c82..b040b5f1d0 100644
--- a/Code/IO/otbImage.txx
+++ b/Code/IO/otbImage.txx
@@ -56,6 +56,12 @@ OTB_GCP& Image<TPixel, VImageDimension>::GetGCPs(unsigned int GCPnum)
   return (this->GetMetaDataInterface()->GetGCPs(GCPnum));
 }
 
+template <class TPixel, unsigned int VImageDimension>
+const OTB_GCP& Image<TPixel, VImageDimension>::GetGCPs(unsigned int GCPnum) const
+{
+  return (this->GetMetaDataInterface()->GetGCPs(GCPnum));
+}
+
 template <class TPixel, unsigned int VImageDimension>
 std::string Image<TPixel, VImageDimension>::GetGCPId(unsigned int GCPnum) const
 {
-- 
GitLab