Skip to content
Snippets Groups Projects
Commit 63fedfa2 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: add average elevation and geoid file accessors in the kmz writer

parent ad3fb415
Branches
Tags
No related merge requests found
...@@ -161,6 +161,12 @@ public: ...@@ -161,6 +161,12 @@ public:
/** Set the DEM Direcotory */ /** Set the DEM Direcotory */
itkSetStringMacro(DEMDirectory); itkSetStringMacro(DEMDirectory);
/** Set the geoid file if any */
itkSetStringMacro(GeoidFile);
/** Set the geoid file if any */
itkSetMacro(AverageElevation, double);
protected: protected:
KmzProductWriter(); KmzProductWriter();
virtual ~KmzProductWriter(); virtual ~KmzProductWriter();
...@@ -314,6 +320,8 @@ private: ...@@ -314,6 +320,8 @@ private:
// DEM directory // DEM directory
std::string m_DEMDirectory; std::string m_DEMDirectory;
std::string m_GeoidFile;
double m_AverageElevation;
}; };
} // end namespace otb } // end namespace otb
......
...@@ -32,7 +32,8 @@ template <class TInputImage> ...@@ -32,7 +32,8 @@ template <class TInputImage>
KmzProductWriter<TInputImage> KmzProductWriter<TInputImage>
::KmzProductWriter(): ::KmzProductWriter():
m_UseExtendMode(true), m_UseExtendMode(true),
m_TileSize(512) m_TileSize(512),
m_AverageElevation(-32768.0)
{ {
// Modify superclass default values, can be overridden by subclasses // Modify superclass default values, can be overridden by subclasses
this->SetNumberOfRequiredInputs(1); this->SetNumberOfRequiredInputs(1);
...@@ -435,7 +436,14 @@ KmzProductWriter<TInputImage> ...@@ -435,7 +436,14 @@ KmzProductWriter<TInputImage>
m_Transform->SetInputProjectionRef(m_VectorImage->GetProjectionRef()); m_Transform->SetInputProjectionRef(m_VectorImage->GetProjectionRef());
m_Transform->SetOutputProjectionRef(wgsRef); m_Transform->SetOutputProjectionRef(wgsRef);
if (!m_DEMDirectory.empty()) if (!m_DEMDirectory.empty())
{
m_Transform->SetDEMDirectory(m_DEMDirectory); m_Transform->SetDEMDirectory(m_DEMDirectory);
m_Transform->SetGeoidFile(m_GeoidFile);
}
else
{
m_Transform->SetAverageElevation(m_AverageElevation);
}
m_Transform->InstanciateTransform(); m_Transform->InstanciateTransform();
InputPointType inputPoint; InputPointType inputPoint;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment