diff --git a/Code/IO/otbKmzProductWriter.h b/Code/IO/otbKmzProductWriter.h index 8a014cbe34d90347c0134db734997b9dbdf59a88..008eedc27fe6eb5a796a55fe176fcc1ddb14fcd3 100644 --- a/Code/IO/otbKmzProductWriter.h +++ b/Code/IO/otbKmzProductWriter.h @@ -161,6 +161,12 @@ public: /** Set the DEM Direcotory */ itkSetStringMacro(DEMDirectory); + /** Set the geoid file if any */ + itkSetStringMacro(GeoidFile); + + /** Set the geoid file if any */ + itkSetMacro(AverageElevation, double); + protected: KmzProductWriter(); virtual ~KmzProductWriter(); @@ -314,6 +320,8 @@ private: // DEM directory std::string m_DEMDirectory; + std::string m_GeoidFile; + double m_AverageElevation; }; } // end namespace otb diff --git a/Code/IO/otbKmzProductWriter.txx b/Code/IO/otbKmzProductWriter.txx index 80984554d1c16e3d7da74a98f737e6ecb89ba2bf..ff6d319d1398f281bec8454c241b2ac264a21b07 100644 --- a/Code/IO/otbKmzProductWriter.txx +++ b/Code/IO/otbKmzProductWriter.txx @@ -32,7 +32,8 @@ template <class TInputImage> KmzProductWriter<TInputImage> ::KmzProductWriter(): m_UseExtendMode(true), - m_TileSize(512) + m_TileSize(512), + m_AverageElevation(-32768.0) { // Modify superclass default values, can be overridden by subclasses this->SetNumberOfRequiredInputs(1); @@ -435,7 +436,14 @@ KmzProductWriter<TInputImage> m_Transform->SetInputProjectionRef(m_VectorImage->GetProjectionRef()); m_Transform->SetOutputProjectionRef(wgsRef); if (!m_DEMDirectory.empty()) + { m_Transform->SetDEMDirectory(m_DEMDirectory); + m_Transform->SetGeoidFile(m_GeoidFile); + } + else + { + m_Transform->SetAverageElevation(m_AverageElevation); + } m_Transform->InstanciateTransform(); InputPointType inputPoint;