Closed (won't fix)
Project:
Geocoder
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2011 at 18:36 UTC
Updated:
21 Jan 2016 at 16:05 UTC
Jump to comment: Most recent
Comments
Comment #1
phayes commentedThis indeed should be in the geocoder queue - moving it there.
This is really a feature request to be able to "reject" geocoding if certain accuracy requirements are not met
Comment #2
Shadlington commentedThanks for the clarification!
Comment #3
petsagouris commentedI believe that this is a duplicate to this: #1295262: Accuracy from google geocode
Comment #4
michaelfavia commentedIt is a duplicate but i would like to fix it. Its nontrivial feature to add but maybe i can spend some time this weekend on this.
Comment #5
phayes commentedSo this is almost ready. I suppose the last thing we need for this to work is that we need some sort of form integration so that the form fails if the geocoding fails. This might be tricky now that we've moved the processing to the entity save, not the form submit.
Comment #6
phayes commentedDoes anyone have any ideas on how this might be accomplished?
Comment #7
michaelfavia commentedI dont know of a mechanism to prevent this to be honest.
Perhaps we could geocode in hook validate/submit and return an error or statically save then in entity save either recapture the static result or reprocess if none exists.
Otherwise youre stuck with a drupal_redirect() + $form_state and set a form error without storing the geofield but that just seems janky and error prone for bulk operations and the like.
Comment #8
miahon commentedHi! Is this ready for testing? I have a similar problem to what Shadlington told
I'm doing the calendar of events and some events do not have the address information at all, but the addressfield module always sends country value to geocoder and and this false information is displayed on the map
Comment #9
ptmkenny commentedAs an alternate approach, there is a patch to improve accuracy of geocoding the country if using the countries module: http://drupal.org/node/1871962
Comment #10
basvredelingHonestly I think this is no longer reliably implementable over all geocoding services. In Google Geocoding API v2 there was an "Accuracy" property returned for the geocoded values. In API v3 this is no longer the case and replaced by a "Location Type" property instead. Which only returns "interpolated" or "approximate" as a value instead of a numeric rating. See this discussion for more info: http://stackoverflow.com/questions/3015370/how-to-get-the-equivalent-of-the-accuracy-in-google-map-geocoder-v3 and for the API documentation: https://developers.google.com/maps/documentation/geocoding/intro#Results.
Regarding other Geocoding services, I've checked both Bing and Yahoo. Bing has a "confidence" value, returning either "low", "medium" or "high" as an accuracy value. See: https://msdn.microsoft.com/en-us/library/jj735477.aspx. Yahoo returns a "Quality" property for it's geocoded values. But this is both contextual (to the search) and non-linear. See: https://developer.yahoo.com/boss/geo/docs/pfrequests.html#result-sub-elements for the documentation.
In either case I believe this should not be a geocoder functionality. Also considering the age of this issue I'm marking this won't fix. I hope the above mentioned documentation will help someone to come up with use-case specific submodules.