GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
cityname of postal code of a position is too exact  XML
Forum Index -> Postal Codes
Author Message
bognerart



Joined: 28/05/2007 23:18:02
Messages: 15
Offline

This is a follow up of my posting at http://forum.geonames.org/gforum/posts/list/454.page

When I query http://ws.geonames.org/findNearbyPostalCodes?lat=47.774321600&lng=13.060253300 I get the postalcode 5020 and as name Morzg, which is in theory correct, but doesn't fit my needs to get as name Morzg, I would like to have Salzburg as a result.

If i do a query with the postalcode, which I got as result:
http://www.geonames.org/postalcode-search.html?q=5020&country=AT I am coming closer to my needs.

The first place is the result, which I would like to get, when I query the position, namely Salzburg.

How can I get this result, when I query the position 47.774321600&lng,13.060253300?
marc



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

Hi

For the search we use the number of hits the Yahoo search returns for a postal code place name combination. Details in this blog posting :
http://geonames.wordpress.com/2006/04/30/postalcode-search-improvements/

We could expose this 'relevance' measurement in the webservice, though I am a bit reluctant since it is not perfect and just a simple heuristic. I fear we will have complaints about this 'relevance' measure if we expose it somewhere.

Marc

[WWW]
bognerart



Joined: 28/05/2007 23:18:02
Messages: 15
Offline

I agree that this is a very good idea. I think you will always find results in the whole world, where some place doesn't fit.

As already asked, how can I get this result with _1_ query from a position? Do I have to write an own script?

Within in the town of Salzburg, I get different results from time to time. This is not the topic of this thread, but there is a connection and it helps me to explain where I see problems and what could be a workaround.

E.g. http://www.geonames.org/maps/showOnMap?q=47.79778%2013.04639 is the salzburg cathedral

About 2 weeks ago I got as name "Nonntal", a part of Salzburg, which is wrong, but Nonntal is very near to the cathedral. I don't know exaxctly where the border is between Nonntal and Altstadt, but the cathedral belongs to Altstadt. But maybe there has been something changed in the last weeks.

When I query http://www.geonames.org/maps/showOnMap?q=47.8061%2013.04108 which is "Mirabellgarten", a famous garden in the town of Salzburg and do the following query:

http://ws.geonames.org/findNearbyPostalCodes?lat=47.8061&lng=13.04108

I get Mönchsberg as name, which is wrong for sure, Mönchsberg is a small hill or if you want mountain not far away. I think the correct name for Mirabellgarten should be "Andräviertel", but this is a lot complex and I wonder how this can be caculated.

Anyway, I think there always will be errors and normally you don't need the place so exact for a photo. I think it is ok, if you get the "main name" for the zip-code.

So I would be happy to have an option to get the most used name for the zip-code as result, when I query a position.

Since I use the results with my script, I would also be happy, if the result is not a detailed website, but a simple text or maybe a xml-file.
deft



Joined: 23/08/2007 15:50:11
Messages: 2
Offline

I have to say I think using numbers of results from search engines is a very bad idea, even if it does work the information is not 'clean', it is not a reliable source. It wasn't created for that purpose. For instance, if a city is very well known worldwide and it's address is published in millions of pages, your search will associate the city of that address with the postal code. Unfortunately, all the addresses in the other cities nearby will be overlooked due to not having their addresses copied all over the web.

I tried testing the postal code lookup several times with local ZIP codes, I found trouble every time I entered a postal code that encompassed more than one city. The more well known city would always be associated with it, I haven't gotten it to give me more than one city name for a ZIP code even once. ie; 98294 should be assoc. with Sultan, Startup, Gold Bar, Index and Halford WA. - but all I get is Sultan. Also, large cities eclipse smaller ones' ZIPs; I look up 98166 - Burien, WA, I get Seattle. 98166 is all Burien and includes none of Seattle.

marc



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

We only use the search engine results for ordering. In Austria there are hundreds of places with the same postal code and if users search with a particular postal code they expect the largest city on top of the result.

If I look up the US zip code 98294 on the United States Postal Service website I get only one single result 'Sultan'. Exactly the same on GeoNames.

http://zip4.usps.com/zip4/citytown_zip.jsp

Do you think the USGS is wrong on this?

Cheers

Marc

[WWW]
deft



Joined: 23/08/2007 15:50:11
Messages: 2
Offline

marc wrote:

If I look up the US zip code 98294 on the United States Postal Service website I get only one single result 'Sultan'. Exactly the same on GeoNames.

http://zip4.usps.com/zip4/citytown_zip.jsp

Do you think the USGS is wrong on this?
 


Look at a map. Sultan's not the only city there, so yeah that's wrong. It should list Index and Gold Bar too.

If you mail a letter via USPS to a Gold Bar address with Sultan as the city name, but with the ZIP 98294, it will get there. But if you send a driver on a rush delivery to "Sultan" but with a Gold Bar address, you've just screwed them over, made it late, caused untold problems. It's just not good enough.

It's wrong in a lot of cases, like with 98166 - it lists the "actual city name" as Seattle although no part of 98166 is within Seattle city limits. It lists "acceptable city names" as the only two cities in that area, Burien and Normandy Park. These type of problems get worse in rural areas where the distances are further between the larger cities and the smaller ones they share ZIPs with.
 
Forum Index -> Postal Codes
Go to:   
Powered by JForum 2.1.5 © JForum Team