diff --git a/Examples/Projections/PlaceNameToLonLat.cxx b/Examples/Projections/PlaceNameToLonLatExample.cxx similarity index 70% rename from Examples/Projections/PlaceNameToLonLat.cxx rename to Examples/Projections/PlaceNameToLonLatExample.cxx index 57d6ffb7f279573255aec59ac4f72ba59ef226d7..a83ae12b7137a7569bfe5e820da0e43a66509927 100644 --- a/Examples/Projections/PlaceNameToLonLat.cxx +++ b/Examples/Projections/PlaceNameToLonLatExample.cxx @@ -19,7 +19,17 @@ #pragma warning ( disable : 4786 ) #endif +// Software Guide : BeginLatex +// +// This example will show how to retrieve the longitude and latitude from +// a place using the name of the city or the address. For that, we will +// use the \doxygen{otb}{PlaceNameToLonLat} class. +// +// Software Guide : EndLatex + +// Software Guide : BeginCodeSnippet #include "otbPlaceNameToLonLat.h" +// Software Guide : EndCodeSnippet int main( int argc, char* argv[] ) { @@ -32,16 +42,19 @@ int main( int argc, char* argv[] ) return EXIT_FAILURE; } - + // Software Guide : BeginCodeSnippet otb::PlaceNameToLonLat::Pointer pn2LL = otb::PlaceNameToLonLat::New(); pn2LL->SetPlaceName(std::string(argv[1])); pn2LL->Evaluate(); + // Software Guide : EndCodeSnippet + // Software Guide : BeginCodeSnippet double lon = pn2LL->GetLon(); double lat = pn2LL->GetLat(); std::cout << "Latitude: " << lat << std::endl; std::cout << "Longitude: " << lon << std::endl; + // Software Guide : EndCodeSnippet return EXIT_SUCCESS;