A couple observations:
First, postal codes are more "granular" than cities . in other words, a
postal code specifies a smaller area than a city does (as a general rule).
Therefore, the postal code will give you
a more precise location, as a general rule (I don't know about Hungary, but
there are exceptions to this rule - some postal codes may cover several
small adjacent settlements in the United States. In that instance, each
city + zip code combination has its own coordinate associated with it.)
When I think of the term "precedence", I think of the scenario - if you have
both a zip code and a city, but the zip code is not within the city, which
do you pay attention to? A few experiments have shown me that the answer is
"it depends" . the fuzzy matching will sometimes prefer one, sometimes
another. But I don't think that's what you're concerned with.
There's something I've mentioned here before, is that there is layer of
middleware between the geocoder and the public geocoding web service that
doesn't map the "state" and "country" fields consistently between the front
and back ends . there was a rationale for why this was done (not a very good
one, in my opinion - and I'm the one stuck explaining it) that causes some
of the geocoding to be unreliable. As a consequence, you get better results
if you use a single "location=" parameter, with the components of your
address separated by an appropriate combination of encoded spaces (" " ==
"+") and commas ("," == "%2C"). So, for Mor, NH, Hungary, you would use:
Which gives you your city coordinate correctly.
If you add the zip code:
It returns the same location.
If you drop the city and state, but keep the zip:
It returns an (apparently more precise) zip code location.
The following also returns the same result, specifying the state, but not
The returned state field is incorrect - that's middleware again. Yes, I
filed a bug about it, awhile ago, had discussions. Yes, I'm annoyed. The
backend works just fine. This is just a an
issue with international addresses.
But, as long as you don't care about the normalized result returned, using
the "location" parameter should give you reliable results.
] On Behalf
Of oruganti saritha
Sent: Tuesday, December 04, 2007 4:47 AM
Subject: [yws-maps] Clarifications in yahoo geocoding
We are developing an application which requires lat and long for the
given address accross the world, by using yahoogeocoding.
while developing, we came to know somme issues.
Among the parameters passed to yahoogeocoding url, which one takes
more precedence(either city or zip).
Can u plese expalin , how yahoogeocoding works exactly(i.e., the
order of precedence , it gives to parameters in the url).
For the above address,yahoo geocoding not returning anything.
but along with zip=8060, it retruns latitude and longitude values.
Can't we get latitude and logitude for the address without zip code
even city and statecode and country are valid.
But when i give the city as 'Northern+Hungary' its returning exact
long and lat without zip code.
Is yahoogeocoding needs state fullname for the countries other than
USA like in first scenario.
[Non-text portions of this message have been removed]