GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Southampton - Geocode json api  XML
Forum Index -> Postal Codes
Author Message
kirsty_wright



Joined: 26/07/2018 11:51:26
Messages: 3
Offline

When we search for Southampton against the JSON API with the country code set, we seem to be getting results from Bermuda when we are only after those on the mainland.

http://api.geonames.org/postalCodeSearchJSON?placename=southampton&country=gb&maxRows=5&username=demo

As you can see from the above request, the first 5 fields are all for Southampton Parish which has a country code of BM. I understand Bermuda is a British overseas territory but I cannot find it listed in https://www.iso.org/obp/ui/#iso:code:3166:GB so surely it should not show up in the API response.

Can anyone help as to why this is happening or assist as to an alternative method to get only the results on the UK mainland (plus Scotland & Wales)?
marc



Joined: 08/12/2005 07:39:47
Messages: 4106
Offline

It is actually a feature
For the depencencies the main country is added added to the search index as a secondary country.
For the UK this might be an overkill for some dependencies as they have their own postal code system. We could exclude them except for Guernsey, Jersey and Isle of Man.

Best Regards

Marc

[WWW]
kirsty_wright



Joined: 26/07/2018 11:51:26
Messages: 3
Offline

Hey Marc,

Is there any way we can filter within a query parameter or something to get just the mainland?

We are using it as a place resolution to search for local services in the UK. So at the moment when people search for Southampton, it says it cannot find anything nearby as it's off in the middle of the Atlantic .

 
Forum Index -> Postal Codes
Go to:   
Powered by JForum 2.1.5 © JForum Team