Skip to content
Snippets Groups Projects
Commit ec7d0904 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

BUG: fix type conversion

parent 2245611c
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@
#include "otbVectorDataFileReader.h"
#include "itksys/SystemTools.hxx"
#include "otbVectorDataAdapter.h"
#include "otbVectorData.h"
namespace otb
{
......@@ -205,12 +206,11 @@ VectorDataFileReader<TOutputVectorData>
}
m_VectorDataIO->SetFileName(m_FileName.c_str());
// m_VectorDataIO->Read(output);
// Tell the VectorDataIO to read the file
//
typedef VectorDataAdapter<TOutputVectorData, TOutputVectorData> AdapterType; //tmp
//typedef VectorDataAdapter<VectorData<double, 3>, TOutputVectorData> AdapterType;
typedef VectorDataAdapter<VectorData<double, 2>, TOutputVectorData> AdapterType;
typename AdapterType::InputVectorDataType::Pointer input = AdapterType::InputVectorDataType::New();
m_VectorDataIO->Read(input);
......
......@@ -23,6 +23,7 @@
#include "otbVectorDataFileWriter.h"
#include "otbVectorDataIOFactory.h"
#include "otbVectorDataAdapter.h"
#include "otbVectorData.h"
namespace otb
{
......@@ -190,14 +191,12 @@ VectorDataFileWriter<TInputVectorData>
//
m_VectorDataIO->SetFileName(m_FileName.c_str());
typedef VectorDataAdapter<TInputVectorData,TInputVectorData > AdapterType; //tmp
//typedef VectorDataAdapter<TInputVectorData, VectorData<double, 3> > AdapterType;
typedef VectorDataAdapter<TInputVectorData, VectorData<double, 2> > AdapterType;
typename AdapterType::Pointer adapter = AdapterType::New();
adapter->SetInput(input);
adapter->Update();
m_VectorDataIO->Write(adapter->GetOutput());
//m_VectorDataIO->Write(input);
}
template <class TInputVectorData>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment