From an address field, the users can enter in Chile their address or put a P.O. Box number called in spanish a "Casilla". Unfortunately, if they enter Casilla 123 this geocodes to a place in Spain called Casilla, even though weirdly enough the country selected is Chile and the City is called Santiago (It's capital).

I can trick it into working if the user puts in "Casilla de Correo" which would be the full translation of P.O Box, but 99% of the time people call it "Casilla" or box.

Even with this trick, I don't understand why it is overriding the country or city fields if it did not find a "casilla" in Chile...why go to Spain????

Thanks again for all the hard work

Comments

simon georges’s picture

Status: Active » Postponed (maintainer needs more info)

What geocoding service are you using? Does it return the same result whichever service you use?

dwalker51’s picture

I am using the location module to geocode the value used in the address field. At present it is set to the google geocoder.

I have tested just now using CHILE as the country selector in the Address field and not filling in any other fields... this takes me to somewhere in Spain... Valladolid

If I put in :
CHILE it takes me to VALLADOLID, SPAIN
CHAD it takes me to CHAD
CHINA takes me to CHINA
SPAIN takes me to MADRID, SPAIN

Changing the locations modules geocoder to LAT/LONG does nothing to change the situation, however
Next I tried fiddling with the accuracy of geocoding within the location module with no change

Ok, another test, with Address field using CHILE as the country and no other fields filled in...it takes me to Valladolid Spain.
However If I add a town, like the Capital SANTIAGO, it geocodes just fine. The same for other town in Chile, LA SERENA, so its only when it just has the country.

If I add a CCK text field and type in CHILE and use locations to geocode from the typed in text it does it fine and shows Chile,

Maybe another issue or related....

The postal codes also seem to function weirdly, if I select, CHILE, LA SERENA and a known postal code of 1710113, which is in downtown La Serena it takes me to somewhere south of Santiago (600KM away)..

This gets to south of Santiago :
1710113 La Serena
Chile

This works fine though :
Gregorio Cordovez 631
1710113 La Serena
Chile

Sorry for the werbal diarrhoea......

simon georges’s picture

Could you eventually test with the patch in #1748412-19: Geofield Mapquest Geocoder and mapquest geocoding service (to see if isolating the country should be the way to go)?

dwalker51’s picture

I have changed the Location fields geocoder to Mapquest Nomination and added the patch.

Chile get me to Cincinnati, USA
La Serena, Chile gets me to Cincinnati, USA

I am still doing some more tests

simon georges’s picture

Issue summary: View changes

Did you do more tests? Can you add some details? Could you eventually try other patches related to better geocoding, such as #2336801: Geofield country geocoding or #1967520: Use Google geocoding components filter for better results with addressfield?

basvredeling’s picture

It could also be related to the Chilean address format being incorrect. Are you using the native address field module or this plugin? https://www.drupal.org/project/addressfield_cl

basvredeling’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This probably won't get any follow-up... the issue was posted in dec 2012 and has been postponed for 3 years now. It is likely that the Chile country code is not being processed by the geocoding service correctly. So if anything, this issue closely resembles: #1871962: Use Countries module to improve geocoding results and #1967520: Use Google geocoding components filter for better results with addressfield. Marking this a duplicate. If @dwalker51 still needs this issue addressed we can reopen it.