Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proximity search to a distance of 20 miles from 3042, Victoria, Australia: We could not geocode the destination address. #12

Closed
yurg opened this issue Sep 26, 2018 · 8 comments
Labels
Milestone

Comments

@yurg
Copy link

yurg commented Sep 26, 2018

Well, it used to work with Google but seems it doesn't if we try Advanced search with country+state/province+postal code. Just wondering if it is something OSM - related ( we don't have OSM API key nor we are sure is required ) or it comes from the extension. Please advise. Thanks!

@bjendres
Copy link
Member

Hi @yurg. The distance search only works if the addresses have been geocoded, i.e. latitude and longitude have been set. You should be able to see that in the UI.

Of course there are differences between different data sets, e.g. between Google's and OSM's. Therefore a different behaviour is not necessarily related to the extension itself.

If you want, you can try your address with https://nominatim.openstreetmap.org, which is the service that the extension uses as well. Let me know how it went. Cheers!

@yurg
Copy link
Author

yurg commented Sep 27, 2018

Hi @systopia , thank you for notes! Have tried https://nominatim.openstreetmap.org and it points to an exact location if only postcode and state/province being searched by: in our case it is "3205 Victoria".
On the other hand, around 365 of contacts in the DB has "Longitude" field empty, e.g.NOT geo-coded. SO I'm going to wait until all addresses get lat/long and try again; will report back with results.
Thanks!

@Upperholme
Copy link

It looks like the dataset used by https://nominatim.openstreetmap.org may not be comprehensive. I've just got the same error when trying an advanced search to find contacts in proximity to the address: 17 Hanover Square, London W1S 1BN. This is a correct address according to the Post Office service at https://www.royalmail.com/find-a-postcode, but I get the message: "We could not geocode the destination address". Using the same Royal Mail service to find the postcode for 17 Hanover Square, London, it returns W1S 1HU. If I use that code then the search works as expected.
I then tested the first postcode (W1S 1BN) using https://www.getthedata.com/open-postcode-geo-api and it gave me correct lat/long coordinates.

@Upperholme
Copy link

Not sure if this extension is fully compatible with more recent Civi releases - 5.18, 5.19 and on - but I'm finding that the custom proximity search isn't working for me, neither is the range search within Civi's Advanced Search. However the extension does seem to work fine in terms of geocoding addresses of contact records that is carried out using the scheduled job. Is it just me?

@Upperholme
Copy link

I've just switched a site over from Open Street Map mapping and Geocoding using this extension, to Google's services, and the proximity search is now working as I'd expect. Which suggests to me that proximity search with this extension isn't working.

@bjendres
Copy link
Member

Hi @Upperholme, thanks for the reports and sorry for the late reply.

The proximity search is not provided by this extension, but by CiviCRM itself, using the geo coordinates. Therefore, if you say that it worked with Google and not with OSM that means most likely that Google was able to resolve more addresses than OSM - which sounds quite possible.

Would you be able to provide one or two of your addresses that were found in the proximity search using Google geocoding, and not found using OSM? Then would could rule out other errors...

@bjendres bjendres added this to the 1.3 milestone Jul 20, 2020
@bjendres bjendres added the bug label Jul 20, 2020
@bjendres bjendres removed the bug label Aug 12, 2020
@bjendres bjendres closed this as completed Dec 8, 2020
@lcdservices
Copy link
Contributor

FYI -- I ran into this and found that it will not geocode the destination address without a street address. We were trying to trigger a proximity searching using only a city/state/country.

From the nominatim site it does seem to support geocoding with just those values, so I'm not sure why the extension requires the street address.

@bjendres
Copy link
Member

From the nominatim site it does seem to support geocoding with just those values, so I'm not sure why the extension requires the street address.

That's an interesting point, moved that to #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants