Commit 186aac61 authored by Luc Hermitte's avatar Luc Hermitte

ENH: OTB-151/GeometriesProjectionFilter -- instrumentation

parent 80d8ccba
......@@ -260,7 +260,6 @@ void otb::GeometriesProjectionFilter::DoProcessLayer(ogr::Layer const& source, o
m_Transform->SetInputProjectionRef(source.GetProjectionRef());
m_Transform->InstanciateTransform();
// std::cout << "GPF::DoProcessLayer: L("<<source.GetName()<<") -> L("<<destination.GetName()<<") ...\n";
if (source != destination)
{
m_TransformationFunctor(source, destination); // if TransformedElementType == layer
......@@ -275,6 +274,5 @@ void otb::GeometriesProjectionFilter::DoProcessLayer(ogr::Layer const& source, o
void otb::GeometriesProjectionFilter::DoDefineNewLayerFields(ogr::Layer const& source, ogr::Layer & dest) const
{
std::cout << "otb::GeometriesProjectionFilter::DoDefineNewLayerFields\n";
m_TransformationFunctor.DefineFields(source, dest);
}
......@@ -151,30 +151,3 @@ void otb::GeometriesSet::PrintSelf(std::ostream& os, itk::Indent indent) const
{
this->apply(Printer(os, indent));
}
#if 0
/*===========================================================================*/
/*=========================[ GetMetaDataDictionary ]=========================*/
/*===========================================================================*/
struct MetaDataDictionaryGetter : boost::static_visitor<itk::MetaDataDictionary&>
{
itk::MetaDataDictionary& operator()(otb::ogr::Layer layer) const
{
return layer.GetMetaDataDictionary();
}
itk::MetaDataDictionary& operator()(otb::ogr::DataSource::Pointer datasource) const
{
return datasource->GetMetaDataDictionary();
}
};
itk::MetaDataDictionary & otb::GeometriesSet::GetMetaDataDictionary()
{
return this->apply(MetaDataDictionaryGetter());
}
itk::MetaDataDictionary const& otb::GeometriesSet::GetMetaDataDictionary() const
{
return const_cast <GeometriesSet *>(this)->GetMetaDataDictionary();
}
#endif
......@@ -113,14 +113,6 @@ public:
*/
bool IsSet() const;
#if 0
/**\name Meta data dictionary */
//@{
itk::MetaDataDictionary & GetMetaDataDictionary();
itk::MetaDataDictionary const& GetMetaDataDictionary() const;
//@}
#endif
/**\name Image reference (spacing + origin) */
//@{
typedef ogr::ImageReference<double> ImageReference;
......
......@@ -156,11 +156,9 @@ struct FieldCopyTransformation
void DefineFields(ogr::Layer const& source, ogr::Layer & dest) const
{
std::cout << " FieldCopyTransformation::DefineFields()\n";
OGRFeatureDefn & inDefinition = source.GetLayerDefn();
for (int i=0,N=inDefinition.GetFieldCount(); i!=N; ++i)
{
std::cout << " - " << ogr::FieldDefn(*inDefinition.GetFieldDefn(i)) << "\n";
dest.CreateField(*inDefinition.GetFieldDefn(i));
}
}
......
......@@ -104,8 +104,6 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_mem_add_n_del_layer)
BOOST_CHECK_THROW(ds->GetLayerChecked(1), itk::ExceptionObject);
BOOST_CHECK_EQUAL(ds->Size(false), 0);
BOOST_CHECK_EQUAL(ds->Size(true), 0);
std::cout << "End of scope" << std::endl;
}
BOOST_AUTO_TEST_CASE(OGRDataSource_new_exceptions)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment