Commit 34c6e4af authored by Emmanuel Christophe's avatar Emmanuel Christophe

Backed out changeset 7c90958e13c3

parent 9fb20ceb
...@@ -100,19 +100,19 @@ IF(WIN32) ...@@ -100,19 +100,19 @@ IF(WIN32)
IF (MSVC) IF (MSVC)
IF(OTB_BUILD_PEDANTIC) IF(OTB_BUILD_PEDANTIC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
ENDIF() ENDIF(OTB_BUILD_PEDANTIC)
IF (MSVC80) IF (MSVC80)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNING) ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNING)
ENDIF() ENDIF(MSVC80)
ENDIF() ENDIF(MSVC)
ELSE() ELSE(WIN32)
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
IF(OTB_BUILD_PEDANTIC) IF(OTB_BUILD_PEDANTIC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
ENDIF() ENDIF(OTB_BUILD_PEDANTIC)
ENDIF() ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
ENDIF(WIN32) ENDIF(WIN32)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
......
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
* \param labelObject the label object to vectorize * \param labelObject the label object to vectorize
* \return The vectorized label object as a polygon. * \return The vectorized label object as a polygon.
*/ */
inline PolygonPointerType operator()(const LabelObjectType * labelObject); inline PolygonType * operator()(const LabelObjectType * labelObject);
private: private:
/// Internal structures /// Internal structures
...@@ -109,6 +109,8 @@ private: ...@@ -109,6 +109,8 @@ private:
/// Walk right to update the finite states machine. /// Walk right to update the finite states machine.
inline void WalkRight(unsigned int line,const IndexType & startPoint, const IndexType & endPoint, PolygonType * polygon, const StateType state); inline void WalkRight(unsigned int line,const IndexType & startPoint, const IndexType & endPoint, PolygonType * polygon, const StateType state);
PolygonPointerType m_Polygon;
// Internal structure to store runs // Internal structure to store runs
RunsPerLineVectorType m_InternalDataSet; RunsPerLineVectorType m_InternalDataSet;
......
...@@ -43,7 +43,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -43,7 +43,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
template<class TLabelObject, class TPolygon> template<class TLabelObject, class TPolygon>
inline typename LabelObjectToPolygonFunctor<TLabelObject,TPolygon> inline typename LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
::PolygonPointerType ::PolygonType *
LabelObjectToPolygonFunctor<TLabelObject,TPolygon> LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
::operator()(const LabelObjectType * labelObject) ::operator()(const LabelObjectType * labelObject)
{ {
...@@ -52,7 +52,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -52,7 +52,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
m_InternalDataSet.clear(); m_InternalDataSet.clear();
PolygonPointerType polygon = PolygonType::New(); m_Polygon = PolygonType::New();
// Get the internal container // Get the internal container
LineContainerType lcontainer = labelObject->GetLineContainer(); LineContainerType lcontainer = labelObject->GetLineContainer();
...@@ -118,7 +118,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -118,7 +118,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = secondCandidateRun; m_CurrentRun = secondCandidateRun;
m_CurrentState = DOWN_RIGHT; m_CurrentState = DOWN_RIGHT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkRight(m_CurrentLine-1,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine-1,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
else else
...@@ -128,7 +128,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -128,7 +128,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = firstCandidateRun; m_CurrentRun = firstCandidateRun;
m_CurrentState = UP_RIGHT; m_CurrentState = UP_RIGHT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
...@@ -141,7 +141,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -141,7 +141,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
// Up-Left Case // Up-Left Case
m_CurrentState = UP_LEFT; m_CurrentState = UP_LEFT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
WalkLeft(m_CurrentLine,m_CurrentPoint,RightEnd(secondCandidateRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine,m_CurrentPoint,RightEnd(secondCandidateRun),m_Polygon, m_CurrentState);
m_CurrentLine--; m_CurrentLine--;
m_CurrentRun = secondCandidateRun; m_CurrentRun = secondCandidateRun;
} }
...@@ -150,7 +150,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -150,7 +150,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
// Down-Left case // Down-Left case
m_CurrentState = DOWN_LEFT; m_CurrentState = DOWN_LEFT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
break; break;
...@@ -171,7 +171,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -171,7 +171,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = secondCandidateRun; m_CurrentRun = secondCandidateRun;
m_CurrentState = UP_LEFT; m_CurrentState = UP_LEFT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
WalkLeft(m_CurrentLine+1,m_CurrentPoint,RightEnd(m_CurrentRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine+1,m_CurrentPoint,RightEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
else else
{ {
...@@ -180,7 +180,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -180,7 +180,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = firstCandidateRun; m_CurrentRun = firstCandidateRun;
m_CurrentState = DOWN_LEFT; m_CurrentState = DOWN_LEFT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
...@@ -195,7 +195,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -195,7 +195,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentLine++; m_CurrentLine++;
m_CurrentState = DOWN_RIGHT; m_CurrentState = DOWN_RIGHT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkRight(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
else else
...@@ -203,7 +203,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -203,7 +203,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
// Up-Right case // Up-Right case
m_CurrentState = UP_RIGHT; m_CurrentState = UP_RIGHT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
...@@ -223,7 +223,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -223,7 +223,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentState = UP_LEFT; m_CurrentState = UP_LEFT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
m_CurrentRun = secondCandidateRun; m_CurrentRun = secondCandidateRun;
WalkLeft(m_CurrentLine+1,m_CurrentPoint,RightEnd(m_CurrentRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine+1,m_CurrentPoint,RightEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
else else
...@@ -233,7 +233,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -233,7 +233,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = firstCandidateRun; m_CurrentRun = firstCandidateRun;
m_CurrentState = DOWN_LEFT; m_CurrentState = DOWN_LEFT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
...@@ -248,14 +248,14 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -248,14 +248,14 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = secondCandidateRun; m_CurrentRun = secondCandidateRun;
m_CurrentState = DOWN_RIGHT; m_CurrentState = DOWN_RIGHT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkRight(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
else else
{ {
// Up-Right case // Up-Right case
m_CurrentState = UP_RIGHT; m_CurrentState = UP_RIGHT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
...@@ -275,7 +275,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -275,7 +275,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = secondCandidateRun; m_CurrentRun = secondCandidateRun;
m_CurrentState = DOWN_RIGHT; m_CurrentState = DOWN_RIGHT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkRight(m_CurrentLine-1,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine-1,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
else else
...@@ -285,7 +285,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -285,7 +285,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
m_CurrentRun = firstCandidateRun; m_CurrentRun = firstCandidateRun;
m_CurrentState = UP_RIGHT; m_CurrentState = UP_RIGHT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),polygon, m_CurrentState); WalkRight(m_CurrentLine,m_CurrentPoint,RightEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
else else
...@@ -297,7 +297,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -297,7 +297,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
// Up-Left case // Up-Left case
m_CurrentState = UP_LEFT; m_CurrentState = UP_LEFT;
m_PositionFlag = RIGHT_END; m_PositionFlag = RIGHT_END;
WalkLeft(m_CurrentLine,m_CurrentPoint,RightEnd(secondCandidateRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine,m_CurrentPoint,RightEnd(secondCandidateRun),m_Polygon, m_CurrentState);
m_CurrentLine--; m_CurrentLine--;
m_CurrentRun = secondCandidateRun; m_CurrentRun = secondCandidateRun;
...@@ -307,7 +307,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -307,7 +307,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
// Down-Left case // Down-Left case
m_CurrentState = DOWN_LEFT; m_CurrentState = DOWN_LEFT;
m_PositionFlag = LEFT_END; m_PositionFlag = LEFT_END;
WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),polygon, m_CurrentState); WalkLeft(m_CurrentLine,m_CurrentPoint,LeftEnd(m_CurrentRun),m_Polygon, m_CurrentState);
} }
} }
...@@ -317,7 +317,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon> ...@@ -317,7 +317,7 @@ LabelObjectToPolygonFunctor<TLabelObject,TPolygon>
goesOn = m_CurrentPoint != m_StartingPoint; goesOn = m_CurrentPoint != m_StartingPoint;
} }
return polygon; return m_Polygon;
} }
template<class TLabelObject, class TPolygon> template<class TLabelObject, class TPolygon>
......
...@@ -117,7 +117,7 @@ VectorDataExtractROI<TVectorData> ...@@ -117,7 +117,7 @@ VectorDataExtractROI<TVectorData>
chrono.Start(); chrono.Start();
ProcessNode(inputRoot,outputRoot); ProcessNode(inputRoot,outputRoot);
chrono.Stop(); chrono.Stop();
std::cout<<"VectorDataExtractROI: "<<m_Kept<<" Features processed in "<<chrono.GetMeanTime()<<" seconds."<<std::endl; otbMsgDevMacro(<<"VectorDataExtractROI: "<<m_Kept<<" Features processed in "<<chrono.GetMeanTime()<<" seconds.");
}/*End GenerateData()*/ }/*End GenerateData()*/
......
...@@ -357,7 +357,11 @@ ImageFileReader<TOutputImage> ...@@ -357,7 +357,11 @@ ImageFileReader<TOutputImage>
{ {
otbMsgDevMacro( <<"OSSIM Open Image SUCCESS ! "); otbMsgDevMacro( <<"OSSIM Open Image SUCCESS ! ");
// hasMetaData = handler->getImageGeometry(geom_kwl); // hasMetaData = handler->getImageGeometry(geom_kwl);
hasMetaData = handler->saveState(geom_kwl); ossimProjection* projection = handler->getImageGeometry()->getProjection();
if (projection)
{
hasMetaData = projection->saveState(geom_kwl);
}
} }
// Free memory // Free memory
delete handler; delete handler;
......
...@@ -108,9 +108,11 @@ ImageFileWriter<TInputImage> ...@@ -108,9 +108,11 @@ ImageFileWriter<TInputImage>
} }
else else
{ {
//FIXME find out exactly what we are trying to do here
//there is no meaning to blindly save the kwl if we didn't update it in the pipeline
// handler->setImageGeometry(geom_kwl); // handler->setImageGeometry(geom_kwl);
handler->loadState(geom_kwl); // handler->getImageGeometry()->getProjection()->loadState(geom_kwl);
handler->saveImageGeometry(); // handler->saveImageGeometry();
handler->close(); handler->close();
} }
} }
......
...@@ -124,7 +124,7 @@ private: ...@@ -124,7 +124,7 @@ private:
/** \class OTB_GCP /** \class OTB_GCP
* *
* \brief This OTB_GCP class is used to manege the GCP parameters * \brief This OTB_GCP class is used to manage the GCP parameters
* in OTB. * in OTB.
* *
*/ */
......
...@@ -552,9 +552,12 @@ StreamingImageFileWriter<TInputImage> ...@@ -552,9 +552,12 @@ StreamingImageFileWriter<TInputImage>
} }
else else
{ {
//FIXME find out exactly what we are trying to do here
//there is no meaning to blindly save the kwl if we didn't update it in the pipeline
// handler->setImageGeometry(geom_kwl); // handler->setImageGeometry(geom_kwl);
handler->loadState(geom_kwl); // handler->getImageGeometry()->getProjection()->loadState(geom_kwl);
handler->saveImageGeometry(); //
// handler->saveImageGeometry();
handler->close(); handler->close();
} }
} }
......
...@@ -120,7 +120,7 @@ GenericMapProjection<Transform, TScalarType, NInputDimensions, NOutputDimensions ...@@ -120,7 +120,7 @@ GenericMapProjection<Transform, TScalarType, NInputDimensions, NOutputDimensions
if (!projectionInformationAvailable) if (!projectionInformationAvailable)
{ {
std::cout << "WARNING: Impossible to create the projection from string: "<< m_ProjectionRefWkt << std::endl; otbMsgDevMacro(<<"WARNING: Impossible to create the projection from string: "<< m_ProjectionRefWkt);
return false; return false;
} }
...@@ -129,7 +129,7 @@ GenericMapProjection<Transform, TScalarType, NInputDimensions, NOutputDimensions ...@@ -129,7 +129,7 @@ GenericMapProjection<Transform, TScalarType, NInputDimensions, NOutputDimensions
//a better solution might be available... //a better solution might be available...
if (std::string(kwl.find("type")) == "ossimEquDistCylProjection") if (std::string(kwl.find("type")) == "ossimEquDistCylProjection")
{ {
std::cout << "WARNING: Not instanciating a ossimEquDistCylProjection"<< std::endl; otbMsgDevMacro(<< "WARNING: Not instanciating a ossimEquDistCylProjection");
return false; return false;
} }
......
This diff is collapsed.
...@@ -51,8 +51,6 @@ public: ...@@ -51,8 +51,6 @@ public:
itkGetMacro( Lat, double ); itkGetMacro( Lat, double );
itkGetMacro( PlaceName, std::string ); itkGetMacro( PlaceName, std::string );
itkSetMacro( Lon, double );
itkSetMacro( Lat, double );
itkSetMacro( PlaceName, std::string ); itkSetMacro( PlaceName, std::string );
typedef enum {ALL, GEONAMES, GOOGLE, YAHOO} SearchMethodEnum;//Not implemented yet TODO typedef enum {ALL, GEONAMES, GOOGLE, YAHOO} SearchMethodEnum;//Not implemented yet TODO
...@@ -80,5 +78,4 @@ private: ...@@ -80,5 +78,4 @@ private:
} // namespace otb } // namespace otb
#endif #endif
...@@ -43,7 +43,7 @@ SensorModelBase< TScalarType,NInputDimensions,NOutputDimensions> ...@@ -43,7 +43,7 @@ SensorModelBase< TScalarType,NInputDimensions,NOutputDimensions>
m_DEMHandler = DEMHandlerType::New(); m_DEMHandler = DEMHandlerType::New();
m_UseDEM = false; m_UseDEM = false;
m_DEMIsLoaded = false; m_DEMIsLoaded = false;
m_AverageElevation = -32768.0; m_AverageElevation = 0.0;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
FILE(GLOB OTBRadiometry_SRCS "*.cxx" ) FILE(GLOB OTBRadiometry_SRCS "*.cxx" )
ADD_LIBRARY(OTBRadiometry ${OTBRadiometry_SRCS}) ADD_LIBRARY(OTBRadiometry ${OTBRadiometry_SRCS})
TARGET_LINK_LIBRARIES (OTBRadiometry OTBCommon otb6S otbossim otbossim) TARGET_LINK_LIBRARIES (OTBRadiometry OTBCommon otb6S)
IF(OTB_LIBRARY_PROPERTIES) IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBRadiometry PROPERTIES ${OTB_LIBRARY_PROPERTIES}) SET_TARGET_PROPERTIES(OTBRadiometry PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES) ENDIF(OTB_LIBRARY_PROPERTIES)
......
...@@ -116,8 +116,12 @@ ADD_TEST(prTePlaceNameToLonLatExampleTest ${EXE_TESTS2} ...@@ -116,8 +116,12 @@ ADD_TEST(prTePlaceNameToLonLatExampleTest ${EXE_TESTS2}
Toulouse Toulouse
) )
ADD_TEST(prTeCoordinateToNameExampleTest ${EXE_TESTS2} ADD_TEST(prTeCoordinateToNameExampleTest ${EXE_TESTS2}
--compare-ascii ${TOL}
${BASELINE}/CoordinateToNameExample.txt
${TEMP}/CoordinateToNameExample.txt
CoordinateToNameExampleTest CoordinateToNameExampleTest
103.78 1.29 103.78 1.29
${TEMP}/CoordinateToNameExample.txt
) )
ENDIF( OTB_USE_CURL ) ENDIF( OTB_USE_CURL )
......
...@@ -19,21 +19,22 @@ ...@@ -19,21 +19,22 @@
#pragma warning ( disable : 4786 ) #pragma warning ( disable : 4786 )
#endif #endif
#include <fstream>
#include "otbCoordinateToName.h" #include "otbCoordinateToName.h"
int main( int argc, char* argv[] ) int main( int argc, char* argv[] )
{ {
if (argc!=3) if (argc!=4)
{ {
std::cout << argv[0] <<" <lon> <lat>" std::cout << argv[0] <<" <lon> <lat> <outputfile>"
<< std::endl; << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
const char * outFileName = argv[3];
otb::CoordinateToName::Pointer conv = otb::CoordinateToName::New(); otb::CoordinateToName::Pointer conv = otb::CoordinateToName::New();
conv->SetLon(atof(argv[1])); conv->SetLon(atof(argv[1]));
...@@ -46,6 +47,11 @@ int main( int argc, char* argv[] ) ...@@ -46,6 +47,11 @@ int main( int argc, char* argv[] )
std::cout << "Nearby place: " << name << std::endl; std::cout << "Nearby place: " << name << std::endl;
std::cout << "Country: " << country << std::endl; std::cout << "Country: " << country << std::endl;
std::ofstream file;
file.open(outFileName);
file << "Nearby place: " << name << std::endl;
file << "Country: " << country << std::endl;
file.close();
return EXIT_SUCCESS; return EXIT_SUCCESS;
......
# data file for the Fltk User Interface Designer (fluid) # data file for the Fltk User Interface Designer (fluid)
version 1.0110 version 1.0107
i18n_type 1 i18n_type 1
i18n_include "otbI18n.h" i18n_include "otbI18n.h"
i18n_function otbGetTextMacro i18n_function otbGetTextMacro
......
# data file for the Fltk User Interface Designer (fluid) # data file for the Fltk User Interface Designer (fluid)
version 1.0110 version 1.0107
i18n_type 1 i18n_type 1
i18n_include "otbI18n.h" i18n_include "otbI18n.h"
i18n_function otbGetTextMacro i18n_function otbGetTextMacro
......
...@@ -23,7 +23,12 @@ IF(OTB_USE_VISU_GUI) ...@@ -23,7 +23,12 @@ IF(OTB_USE_VISU_GUI)
ADD_EXECUTABLE(SimpleViewer SimpleViewer.cxx ) ADD_EXECUTABLE(SimpleViewer SimpleViewer.cxx )
TARGET_LINK_LIBRARIES(SimpleViewer OTBCommon OTBIO OTBGui OTBVisualization ${OTB_VISU_GUI_LIBRARIES}) TARGET_LINK_LIBRARIES(SimpleViewer OTBCommon OTBIO OTBGui OTBVisualization ${OTB_VISU_GUI_LIBRARIES})
SUBDIRS(BasicApplication) # The basic application tutorial makes use of the otbApplicationsCommon library which is built in OTB-Applications package.
# Therefore this tutorial will not compile until we move the OTBApplcationsCommon lib to the OTB. Until then,
# the following line will be commented out.
# SUBDIRS(BasicApplication)
ENDIF(OTB_USE_VISU_GUI) ENDIF(OTB_USE_VISU_GUI)
ADD_EXECUTABLE(OrthoFusion OrthoFusion.cxx ) ADD_EXECUTABLE(OrthoFusion OrthoFusion.cxx )
......
This diff is collapsed.
This diff is collapsed.
...@@ -75,7 +75,7 @@ int otbCreateProjectionWithOSSIM( int argc, char* argv[] ) ...@@ -75,7 +75,7 @@ int otbCreateProjectionWithOSSIM( int argc, char* argv[] )
ossimKeywordlist geom; ossimKeywordlist geom;
otbGenericMsgDebugMacro(<< "Read ossim Keywordlist..." ); otbGenericMsgDebugMacro(<< "Read ossim Keywordlist..." );
handler->saveState(geom); handler->getImageGeometry()->getProjection()->saveState(geom);
ossimGpt ossimGPoint(0,0); ossimGpt ossimGPoint(0,0);
ossimDpt ossimDPoint; ossimDpt ossimDPoint;
otbGenericMsgDebugMacro(<< "Creating projection..." ); otbGenericMsgDebugMacro(<< "Creating projection..." );
......
...@@ -62,10 +62,10 @@ int otbSensorModel( int argc, char* argv[] ) ...@@ -62,10 +62,10 @@ int otbSensorModel( int argc, char* argv[] )
forwardSensorModel->SetAverageElevation(16.19688987731934); forwardSensorModel->SetAverageElevation(16.19688987731934);
itk::Point<double,2> imagePoint; itk::Point<double,2> imagePoint;
// imagePoint[0]=10; imagePoint[0]=10;
// imagePoint[1]=10; imagePoint[1]=10;
imagePoint[0]=3069; // imagePoint[0]=3069;