Hello,
I am geocoding a bunch of addresses and I encountered something odd.
The addresses are schools and my script always checks the returned zip
code before updating the database.
In some cases, if I send a street address, I get a ROOFTOP result but
with a different zip code than the one I sent, while if I send the
name of the school without an address then I get an APPROXIMATE result
with the correct zip code.
The returned lat/lon is identical in both cases.
Example:
Street address -> I get a ROOFTOP result but with a different zip
code:
----------------------------------------------------------
3510 N YARBROUGH DR, EL PASO, 79925, TX
http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=3510%20N%20YARBROUGH%20DR,%20EL%20PASO,%2079925,%20TX
----------------------------------------------------------
<GeocodeResponse>
<status>OK</status>
<result>
<type>street_address</type>
<formatted_address>3510 N Yarbrough Dr, El Paso, TX 79935, USA</
formatted_address>
<address_component>
<long_name>3510</long_name>
.. SNIP ...
<type>country</type>
<type>political</type>
</address_component>
<address_component>
<long_name>79935</long_name>
<short_name>79935</short_name>
<type>postal_code</type>
</address_component>
<geometry>
<location>
<lat>31.7961830</lat>
<lng>-106.3314190</lng>
</location>
<location_type>ROOFTOP</location_type>
----------------------------------------------------------
School name -> APPROXIMATE result with the correct zip code:
----------------------------------------------------------
NEW WORLD MONTESSORI SCHOOL, TX
http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=NEW%20WORLD%20MONTESSORI%20SCHOOL,%20TX
----------------------------------------------------------
<GeocodeResponse>
<status>OK</status>
<result>
<type>point_of_interest</type>
<type>establishment</type>
<formatted_address>New World Montessori School, 3510 N Yarbrough Dr,
El Paso, TX 79925-1626, USA</formatted_address>
<address_component>
.. SNIP ..
<type>country</type>
<type>political</type>
</address_component>
<address_component>
<long_name>79925-1626</long_name>
<short_name>79925-1626</short_name>
<type>postal_code</type>
</address_component>
<geometry>
<location>
<lat>31.7961830</lat>
<lng>-106.3314190</lng>
</location>
<location_type>APPROXIMATE</location_type>
----------------------------------------------------------
Does anyone care to comment before I post to the issue tracker?
--
Marcelo -
http://maps.forum.nu
--