Commit 92306219 authored by Emmanuel Christophe's avatar Emmanuel Christophe

DOC: add MapProjectionExample

parent 8a3a85f0
......@@ -15,6 +15,9 @@ SET(PROJECTIONS_EXAMPLES ${CXX_TEST_PATH}/otbProjectionsExamplesTests)
ADD_EXECUTABLE(SensorModelExample SensorModelExample.cxx )
TARGET_LINK_LIBRARIES(SensorModelExample OTBProjections OTBCommon OTBIO ITKCommon ITKIO)
ADD_EXECUTABLE(MapProjectionExample MapProjectionExample.cxx )
TARGET_LINK_LIBRARIES(MapProjectionExample OTBProjections OTBCommon OTBIO)
ADD_EXECUTABLE(OrthoRectificationExample OrthoRectificationExample.cxx )
TARGET_LINK_LIBRARIES(OrthoRectificationExample OTBProjections OTBCommon OTBIO ITKCommon ITKIO)
......
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "otbMapProjections.h"
int main( int argc, char* argv[] )
{
if(argc < 3 )
{
std::cout << argv[0] <<" <lon> <lat> <outputfile>" << std::endl;
return EXIT_FAILURE;
}
double lon = atof(argv[1]);
double lat = atof(argv[2]);
const char * outFileName = argv[3];
std::ofstream file;
file.open(outFileName);
file << std::setprecision(15);
otb::UtmForwardProjection::Pointer lUtmProjection = otb::UtmForwardProjection::New();
return EXIT_SUCCESS;
}
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