]> git.openstreetmap.org Git - rails.git/commitdiff
Remove Geonames and geocoder.ca
authorRichard Fairhurst <richard@systemed.net>
Mon, 9 Jan 2023 21:23:48 +0000 (21:23 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 9 Jan 2023 21:23:48 +0000 (21:23 +0000)
app/abilities/ability.rb
app/controllers/geocoder_controller.rb
config/locales/en.yml
config/routes.rb
config/settings.yml
config/settings/test.yml
test/abilities/abilities_test.rb
test/controllers/geocoder_controller_test.rb
test/http/geocoder_ca.yml [deleted file]
test/http/geonames.yml [deleted file]

index bb9cd6300526aec6afa84e4c3549e7ac710c2040..fd548c5f38a38a18a1d03f9f91972732b2d7816c 100644 (file)
@@ -9,8 +9,7 @@ class Ability
     can :search, :direction
     can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :communities, :preview, :copyright, :key, :id], :site
     can [:finish, :embed], :export
-    can [:search, :search_latlon, :search_ca_postcode, :search_osm_nominatim,
-         :search_geonames, :search_osm_nominatim_reverse, :search_geonames_reverse], :geocoder
+    can [:search, :search_latlon, :search_osm_nominatim, :search_osm_nominatim_reverse], :geocoder
     can [:token, :request_token, :access_token, :test_request], :oauth
 
     if Settings.status != "database_offline"
index 4f9efa4dc553305d39e607b8f06dda3de6d1d5a1..fc8b3a60bab0d068170a01e600ed771564569fe8 100644 (file)
@@ -15,19 +15,8 @@ class GeocoderController < ApplicationController
     if @params[:lat] && @params[:lon]
       @sources.push "latlon"
       @sources.push "osm_nominatim_reverse"
-      @sources.push "geonames_reverse" if Settings.key?(:geonames_username)
     elsif @params[:query]
-      case @params[:query]
-      when /^\d{5}(-\d{4})?$/,
-           /^(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW])\s*[0-9][ABD-HJLNP-UW-Z]{2})$/i
-        @sources.push "osm_nominatim"
-      when /^[A-Z]\d[A-Z]\s*\d[A-Z]\d$/i
-        @sources.push "ca_postcode"
-        @sources.push "osm_nominatim"
-      else
-        @sources.push "osm_nominatim"
-        @sources.push "geonames" if Settings.key?(:geonames_username)
-      end
+      @sources.push "osm_nominatim"
     end
 
     if @sources.empty?
@@ -81,28 +70,6 @@ class GeocoderController < ApplicationController
     end
   end
 
-  def search_ca_postcode
-    # get query parameters
-    query = params[:query]
-    @results = []
-
-    # ask geocoder.ca (note - they have a per-day limit)
-    response = fetch_xml("https://geocoder.ca/?geoit=XML&postal=#{escape_query(query)}")
-
-    # parse the response
-    if response.get_elements("geodata/error").empty?
-      @results.push(:lat => response.text("geodata/latt"),
-                    :lon => response.text("geodata/longt"),
-                    :zoom => Settings.postcode_zoom,
-                    :name => query.upcase)
-    end
-
-    render :action => "results"
-  rescue StandardError => e
-    @error = "Error contacting geocoder.ca: #{e}"
-    render :action => "error"
-  end
-
   def search_osm_nominatim
     # get query parameters
     query = params[:query]
@@ -172,38 +139,6 @@ class GeocoderController < ApplicationController
     render :action => "error"
   end
 
-  def search_geonames
-    # get query parameters
-    query = params[:query]
-
-    # get preferred language
-    lang = I18n.locale.to_s.split("-").first
-
-    # create result array
-    @results = []
-
-    # ask geonames.org
-    response = fetch_xml("http://api.geonames.org/search?q=#{escape_query(query)}&lang=#{lang}&maxRows=20&username=#{Settings.geonames_username}")
-
-    # parse the response
-    response.elements.each("geonames/geoname") do |geoname|
-      lat = geoname.text("lat")
-      lon = geoname.text("lng")
-      name = geoname.text("name")
-      country = geoname.text("countryName")
-
-      @results.push(:lat => lat, :lon => lon,
-                    :zoom => Settings.geonames_zoom,
-                    :name => name,
-                    :suffix => ", #{country}")
-    end
-
-    render :action => "results"
-  rescue StandardError => e
-    @error = "Error contacting api.geonames.org: #{e}"
-    render :action => "error"
-  end
-
   def search_osm_nominatim_reverse
     # get query parameters
     lat = params[:lat]
@@ -237,37 +172,6 @@ class GeocoderController < ApplicationController
     render :action => "error"
   end
 
-  def search_geonames_reverse
-    # get query parameters
-    lat = params[:lat]
-    lon = params[:lon]
-
-    # get preferred language
-    lang = I18n.locale.to_s.split("-").first
-
-    # create result array
-    @results = []
-
-    # ask geonames.org
-    response = fetch_xml("http://api.geonames.org/countrySubdivision?lat=#{lat}&lng=#{lon}&lang=#{lang}&username=#{Settings.geonames_username}")
-
-    # parse the response
-    response.elements.each("geonames/countrySubdivision") do |geoname|
-      name = geoname.text("adminName1")
-      country = geoname.text("countryName")
-
-      @results.push(:lat => lat, :lon => lon,
-                    :zoom => Settings.geonames_zoom,
-                    :name => name,
-                    :suffix => ", #{country}")
-    end
-
-    render :action => "results"
-  rescue StandardError => e
-    @error = "Error contacting api.geonames.org: #{e}"
-    render :action => "error"
-  end
-
   private
 
   def fetch_text(url)
index dbc5272c52dae3f4335193a53ae3064e7235ad10..0d2da3a328a9e288088b4739d55e97cb041be506 100644 (file)
@@ -590,11 +590,8 @@ en:
     search:
       title:
         latlon_html: 'Results from <a href="https://openstreetmap.org/">Internal</a>'
-        ca_postcode_html: 'Results from <a href="https://geocoder.ca/">Geocoder.CA</a>'
         osm_nominatim_html: 'Results from <a href="https://nominatim.openstreetmap.org/">OpenStreetMap Nominatim</a>'
-        geonames_html: 'Results from <a href="http://www.geonames.org/">GeoNames</a>'
         osm_nominatim_reverse_html: 'Results from <a href="https://nominatim.openstreetmap.org/">OpenStreetMap Nominatim</a>'
-        geonames_reverse_html: 'Results from <a href="http://www.geonames.org/">GeoNames</a>'
     search_osm_nominatim:
       prefix_format: "%{name}"
       prefix:
index 80b897d08f6ba21c82f44b3b7db6b2330adb7f6b..8fd11c09189899e46f3bb560f6f899ebf9fb73c4 100644 (file)
@@ -261,11 +261,8 @@ OpenStreetMap::Application.routes.draw do
   # geocoder
   get "/search" => "geocoder#search"
   get "/geocoder/search_latlon" => "geocoder#search_latlon"
-  get "/geocoder/search_ca_postcode" => "geocoder#search_ca_postcode"
   get "/geocoder/search_osm_nominatim" => "geocoder#search_osm_nominatim"
-  get "/geocoder/search_geonames" => "geocoder#search_geonames"
   get "/geocoder/search_osm_nominatim_reverse" => "geocoder#search_osm_nominatim_reverse"
-  get "/geocoder/search_geonames_reverse" => "geocoder#search_geonames_reverse"
 
   # directions
   get "/directions" => "directions#search"
index 6e3f431f754b1b8c90ce3fc46b0f33c63562c220..1c2d26a5a66a212fe9fe2bc2a5acb6f780987c8e 100644 (file)
@@ -37,8 +37,6 @@ max_number_of_relation_members: 32000
 max_note_request_area: 25
 # Zoom level to use for postcode results from the geocoder
 postcode_zoom: 15
-# Zoom level to use for geonames results from the geocoder
-geonames_zoom: 12
 # Timeout for API calls in seconds
 api_timeout: 300
 # Timeout for web pages in seconds
@@ -51,8 +49,6 @@ max_messages_per_hour: 60
 max_friends_per_hour: 60
 # Domain for handling message replies
 #messages_domain: "messages.openstreetmap.org"
-# Geonames authentication details
-#geonames_username: ""
 # MaxMind GeoIPv2 database
 #maxmind_database: ""
 # Users to show as being nearby
index 5c5673f7dfd3a364fa1edda5ec12c1dfa128fb23..1f951e8723fb9aa2d6d2c2cdcfce5d5eda58138c 100644 (file)
@@ -1,7 +1,5 @@
 # Ignore the diary feed delay unless we're specifically testing it
 diary_feed_delay: 0
-# Geonames credentials for testing
-geonames_username: "dummy"
 # External authentication credentials for testing
 google_auth_id: "dummy"
 google_auth_secret: "dummy"
index c27f758333d7d5818f2e6d1b52011369472707fb..139f270feee4d274d402f84630632e6bbde1dc41 100644 (file)
@@ -9,8 +9,8 @@ class GuestAbilityTest < AbilityTest
   test "geocoder permission for a guest" do
     ability = Ability.new nil
 
-    [:search, :search_latlon, :search_ca_postcode, :search_osm_nominatim,
-     :search_geonames, :search_osm_nominatim_reverse, :search_geonames_reverse].each do |action|
+    [:search, :search_latlon, :search_osm_nominatim,
+     :search_osm_nominatim_reverse].each do |action|
       assert ability.can?(action, :geocoder), "should be able to #{action} geocoder"
     end
   end
index d0f0ce086ef4fe4b93988057e43c761ab335c81e..0d3b80e9e380787f3d84f228e3222c5507f12bec 100644 (file)
@@ -12,26 +12,14 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
       { :path => "/geocoder/search_latlon", :method => :get },
       { :controller => "geocoder", :action => "search_latlon" }
     )
-    assert_routing(
-      { :path => "/geocoder/search_ca_postcode", :method => :get },
-      { :controller => "geocoder", :action => "search_ca_postcode" }
-    )
     assert_routing(
       { :path => "/geocoder/search_osm_nominatim", :method => :get },
       { :controller => "geocoder", :action => "search_osm_nominatim" }
     )
-    assert_routing(
-      { :path => "/geocoder/search_geonames", :method => :get },
-      { :controller => "geocoder", :action => "search_geonames" }
-    )
     assert_routing(
       { :path => "/geocoder/search_osm_nominatim_reverse", :method => :get },
       { :controller => "geocoder", :action => "search_osm_nominatim_reverse" }
     )
-    assert_routing(
-      { :path => "/geocoder/search_geonames_reverse", :method => :get },
-      { :controller => "geocoder", :action => "search_geonames_reverse" }
-    )
   end
 
   ##
@@ -263,13 +251,13 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
   ##
   # Test identification of Canadian postcodes
   def test_identify_ca_postcode
-    search_check "A1B 2C3", %w[ca_postcode osm_nominatim]
+    search_check "A1B 2C3", %w[osm_nominatim]
   end
 
   ##
   # Test identification fall through to the default case
   def test_identify_default
-    search_check "foo bar baz", %w[osm_nominatim geonames]
+    search_check "foo bar baz", %w[osm_nominatim]
   end
 
   ##
@@ -315,28 +303,6 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
     results_check_error "Latitude or longitude are out of range"
   end
 
-  ##
-  # Test the Canadian postcode search
-  def test_search_ca_postcode
-    with_http_stubs "geocoder_ca" do
-      get geocoder_search_ca_postcode_path(:query => "A1B 2C3", :zoom => 10,
-                                           :minlon => -0.559, :minlat => 51.217,
-                                           :maxlon => 0.836, :maxlat => 51.766), :xhr => true
-
-      results_check :name => "A1B 2C3", :lat => "47.172520", :lon => "-55.440515"
-
-      get geocoder_search_ca_postcode_path(:query => "k1a 0b1", :zoom => 10,
-                                           :minlon => -0.559, :minlat => 51.217,
-                                           :maxlon => 0.836, :maxlat => 51.766), :xhr => true
-      results_check :name => "K1A 0B1", :lat => "45.375437", :lon => "-75.691041"
-
-      get geocoder_search_ca_postcode_path(:query => "Q0Q 0Q0", :zoom => 10,
-                                           :minlon => -0.559, :minlat => 51.217,
-                                           :maxlon => 0.836, :maxlat => 51.766), :xhr => true
-      results_check
-    end
-  end
-
   ##
   # Test the nominatim forward search
   def test_search_osm_nominatim
@@ -370,37 +336,6 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
     end
   end
 
-  ##
-  # Test the geonames forward search
-  def test_search_geonames
-    with_http_stubs "geonames" do
-      get geocoder_search_geonames_path(:query => "Hoddesdon", :zoom => 10, :minlon => -0.559, :minlat => 51.217,
-                                        :maxlon => 0.836, :maxlat => 51.766), :xhr => true
-      results_check :name => "Hoddesdon", :lat => 51.76148, :lon => -0.01144
-
-      get geocoder_search_geonames_path(:query => "Broxbourne", :zoom => 10,
-                                        :minlon => -0.559, :minlat => 51.217,
-                                        :maxlon => 0.836, :maxlat => 51.766), :xhr => true
-      results_check({ :name => "Broxbourne", :lat => 51.74712, :lon => -0.01923 },
-                    { :name => "Broxbourne District", :lat => 51.73026, :lon => -0.04821 },
-                    { :name => "Cheshunt", :lat => 51.70791, :lon => -0.03739 },
-                    { :name => "Hoddesdon", :lat => 51.76148, :lon => -0.01144 },
-                    { :name => "Waltham Cross", :lat => 51.68905, :lon => -0.0333 },
-                    { :name => "Goffs Oak", :lat => 51.71015, :lon => -0.0872 },
-                    { :name => "Wormley", :lat => 51.7324, :lon => -0.0242 },
-                    { :name => "Broxbourne", :lat => -27.50314, :lon => 151.378 },
-                    { :name => "Lee Valley White Water Centre", :lat => 51.68814, :lon => -0.01682 },
-                    { :name => "Cheshunt Railway Station", :lat => 51.703, :lon => -0.024 },
-                    { :name => "Theobalds Grove Railway Station", :lat => 51.692, :lon => -0.035 },
-                    { :name => "Waltham Cross Railway Station", :lat => 51.685, :lon => -0.027 },
-                    { :name => "Rye House Station", :lat => 51.76938, :lon => 0.00562 },
-                    { :name => "Broxbourne Station", :lat => 51.74697, :lon => -0.01105 },
-                    { :name => "Broxbornebury Park", :lat => 51.75252, :lon => -0.03839 },
-                    { :name => "Marriott Cheshunt", :lat => 51.7208, :lon => -0.0324 },
-                    { :name => "Cheshunt Community Hospital", :lat => 51.68396, :lon => -0.03951 })
-    end
-  end
-
   ##
   # Test the nominatim reverse search
   def test_search_osm_nominatim_reverse
@@ -422,16 +357,6 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
     end
   end
 
-  ##
-  # Test the geonames reverse search
-  def test_search_geonames_reverse
-    with_http_stubs "geonames" do
-      get geocoder_search_geonames_reverse_path(:lat => 51.7632, :lon => -0.0076, :zoom => 15), :xhr => true
-      results_check :name => "England", :suffix => ", United Kingdom",
-                    :lat => 51.7632, :lon => -0.0076
-    end
-  end
-
   private
 
   def latlon_check(query, lat, lon)
@@ -439,7 +364,7 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
     assert_response :success
     assert_template :search
     assert_template :layout => "map"
-    assert_equal %w[latlon osm_nominatim_reverse geonames_reverse], assigns(:sources)
+    assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources)
     assert_nil @controller.params[:query]
     assert_in_delta lat, @controller.params[:lat]
     assert_in_delta lon, @controller.params[:lon]
@@ -448,7 +373,7 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest
     assert_response :success
     assert_template :search
     assert_template :layout => "xhr"
-    assert_equal %w[latlon osm_nominatim_reverse geonames_reverse], assigns(:sources)
+    assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources)
     assert_nil @controller.params[:query]
     assert_in_delta lat, @controller.params[:lat]
     assert_in_delta lon, @controller.params[:lon]
diff --git a/test/http/geocoder_ca.yml b/test/http/geocoder_ca.yml
deleted file mode 100644 (file)
index 0fbaa10..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/?geoit=XML&postal=A1B%202C3:
-  code: 200
-  body: |
-    <?xml version="1.0" encoding="UTF-8"?>
-    <geodata>
-        <latt>47.172520</latt>
-      <longt>-55.440515</longt>
-      <postal>A1B2C3</postal>
-      <standard>
-        <stnumber>1</stnumber>
-        <staddress/>
-        <city>ST. JOHN&amp;'S</city>
-        <prov>NL</prov>
-        <confidence>0.9</confidence>
-      </standard>
-    </geodata>
-
-/?geoit=XML&postal=k1a%200b1:
-  code: 200
-  body: |
-    <?xml version="1.0" encoding="UTF-8"?>
-    <geodata>
-      <latt>45.375437</latt>
-      <longt>-75.691041</longt>
-      <postal>K1A0B1</postal>
-      <standard>
-        <stnumber>1</stnumber>
-        <staddress/>
-        <city>OTTAWA</city>
-        <prov>ON</prov>
-        <confidence>0.9</confidence>
-      </standard>
-    </geodata>
-
-/?geoit=XML&postal=Q0Q%200Q0:
-  code: 200
-  body: |
-    <?xml version="1.0" encoding="UTF-8"?>
-    <geodata>
-      <error>
-        <code>008</code>
-        <description>Your request did not produce any results. Check your spelling and try again.</description>
-      </error>
-      <latt/>
-      <longt>-</longt>
-      <postal>Q0Q0Q0</postal>
-      <standard>
-        <stnumber>1</stnumber>
-        <staddress/>
-        <city/>
-        <prov/>
-        <confidence>0.9</confidence>
-      </standard>
-    </geodata>
diff --git a/test/http/geonames.yml b/test/http/geonames.yml
deleted file mode 100644 (file)
index 65356c8..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-/search?lang=en&maxRows=20&q=Hoddesdon&username=dummy:
-  code: 200
-  body: |
-    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-    <geonames style="MEDIUM">
-      <totalResultsCount>1</totalResultsCount>
-      <geoname>
-        <toponymName>Hoddesdon</toponymName>
-        <name>Hoddesdon</name>
-        <lat>51.76148</lat>
-        <lng>-0.01144</lng>
-        <geonameId>2646807</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>P</fcl>
-        <fcode>PPL</fcode>
-      </geoname>
-    </geonames>
-  
-/search?lang=en&maxRows=20&q=Broxbourne&username=dummy:
-  code: 200
-  body: |
-    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-    <geonames style="MEDIUM">
-      <totalResultsCount>17</totalResultsCount>
-      <geoname>
-        <toponymName>Broxbourne</toponymName>
-        <name>Broxbourne</name>
-        <lat>51.74712</lat>
-        <lng>-0.01923</lng>
-        <geonameId>2654481</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>P</fcl>
-        <fcode>PPL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Broxbourne District</toponymName>
-        <name>Broxbourne District</name>
-        <lat>51.73026</lat>
-        <lng>-0.04821</lng>
-        <geonameId>7290563</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>A</fcl>
-        <fcode>ADM3</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Cheshunt</toponymName>
-        <name>Cheshunt</name>
-        <lat>51.70791</lat>
-        <lng>-0.03739</lng>
-        <geonameId>2653232</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>P</fcl>
-        <fcode>PPL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Hoddesdon</toponymName>
-        <name>Hoddesdon</name>
-        <lat>51.76148</lat>
-        <lng>-0.01144</lng>
-        <geonameId>2646807</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>P</fcl>
-        <fcode>PPL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Waltham Cross</toponymName>
-        <name>Waltham Cross</name>
-        <lat>51.68905</lat>
-        <lng>-0.0333</lng>
-        <geonameId>2634842</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>P</fcl>
-        <fcode>PPL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Goffs Oak</toponymName>
-        <name>Goffs Oak</name>
-        <lat>51.71015</lat>
-        <lng>-0.0872</lng>
-        <geonameId>2648362</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>P</fcl>
-        <fcode>PPL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Wormley</toponymName>
-        <name>Wormley</name>
-        <lat>51.7324</lat>
-        <lng>-0.0242</lng>
-        <geonameId>2633535</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>P</fcl>
-        <fcode>PPL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Broxbourne</toponymName>
-        <name>Broxbourne</name>
-        <lat>-27.50314</lat>
-        <lng>151.378</lng>
-        <geonameId>8792801</geonameId>
-        <countryCode>AU</countryCode>
-        <countryName>Australia</countryName>
-        <fcl>S</fcl>
-        <fcode>HMSD</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Lee Valley White Water Centre</toponymName>
-        <name>Lee Valley White Water Centre</name>
-        <lat>51.68814</lat>
-        <lng>-0.01682</lng>
-        <geonameId>7670551</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>FCL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Cheshunt Railway Station</toponymName>
-        <name>Cheshunt Railway Station</name>
-        <lat>51.703</lat>
-        <lng>-0.024</lng>
-        <geonameId>6952282</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>RSTN</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Theobalds Grove Railway Station</toponymName>
-        <name>Theobalds Grove Railway Station</name>
-        <lat>51.692</lat>
-        <lng>-0.035</lng>
-        <geonameId>6953715</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>RSTN</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Waltham Cross Railway Station</toponymName>
-        <name>Waltham Cross Railway Station</name>
-        <lat>51.685</lat>
-        <lng>-0.027</lng>
-        <geonameId>6953801</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>RSTN</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Rye House Station</toponymName>
-        <name>Rye House Station</name>
-        <lat>51.76938</lat>
-        <lng>0.00562</lng>
-        <geonameId>6691700</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>RSTN</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Broxbourne Station</toponymName>
-        <name>Broxbourne Station</name>
-        <lat>51.74697</lat>
-        <lng>-0.01105</lng>
-        <geonameId>6691701</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>RSTN</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Broxbornebury Park</toponymName>
-        <name>Broxbornebury Park</name>
-        <lat>51.75252</lat>
-        <lng>-0.03839</lng>
-        <geonameId>6286417</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>CSTL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Marriott Cheshunt</toponymName>
-        <name>Marriott Cheshunt</name>
-        <lat>51.7208</lat>
-        <lng>-0.0324</lng>
-        <geonameId>6512481</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>HTL</fcode>
-      </geoname>
-      <geoname>
-        <toponymName>Cheshunt Community Hospital</toponymName>
-        <name>Cheshunt Community Hospital</name>
-        <lat>51.68396</lat>
-        <lng>-0.03951</lng>
-        <geonameId>6289233</geonameId>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <fcl>S</fcl>
-        <fcode>HSP</fcode>
-      </geoname>
-    </geonames>
-  
-/countrySubdivision?lang=en&lat=51.7632&lng=-0.0076&username=dummy:
-  code: 200
-  body: |
-    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-    <geonames>
-      <countrySubdivision>
-        <countryCode>GB</countryCode>
-        <countryName>United Kingdom</countryName>
-        <adminCode1>ENG</adminCode1>
-        <adminName1>England</adminName1>
-        <code type="ISO3166-2">ENG</code>
-        <distance>0.0</distance>
-      </countrySubdivision>
-    </geonames>