From 2059ba9351a99cf0b9d202386fa8b5bcd0de043f Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Thu, 19 Apr 2012 11:23:47 +0200
Subject: [PATCH] BUG: change access to GeoName web-service

---
 Code/IO/otbCoordinateToName.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Code/IO/otbCoordinateToName.cxx b/Code/IO/otbCoordinateToName.cxx
index c2c09fffbd..dc3ba28600 100644
--- a/Code/IO/otbCoordinateToName.cxx
+++ b/Code/IO/otbCoordinateToName.cxx
@@ -104,10 +104,11 @@ void CoordinateToName::DoEvaluate()
   if (Utils::IsLonLatValid(m_Lon, m_Lat))
     {
     std::ostringstream urlStream;
-    urlStream << "http://ws.geonames.org/findNearbyPlaceName?lat=";
+    urlStream << "http://api.geonames.org/findNearbyPlaceName?lat=";
     urlStream << m_Lat;
     urlStream << "&lng=";
     urlStream << m_Lon;
+    urlStream << "&username=otbteam";
     otbMsgDevMacro("CoordinateToName: retrieve url " << urlStream.str());
 
     try
-- 
GitLab