Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Geocoding returns wrong latitude and longitude

Hi all,

I have a table with only a column with a number of zipcodes.

I agreed with the customer that:

- if length zipcode = 5 => 'France'

- if length zipcode = 4 => 'Belgium'.

If there is an incorrect zipcode, Google should return 'ZERO_RESULTS' as GeoCode Status.

For the zipcodes in Belgium,  this is working correct. However for the zipcodes in France, Google returns geo-date from locations in the US.

I would like to know how I can have a reliable result from Google?

See QVW in the attachment.

Kind regards,

Fien

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think you get the correct error code (ZERO_RESULTS) if you use postal_code instead of postal code in your GeoAdress strings, like

http://maps.google.com/maps/api/geocode/xml?sensor=false&ie=utf8&address=postal_code=73403,country=f...

vs.

http://maps.google.com/maps/api/geocode/xml?sensor=false&ie=utf8&address=postal code=73403,country=f...

P.S: seems like this is a CEDEX code that google can't assign a location. As an approximation for those locations, you can try rounding these codes to the hundres:

http://maps.google.com/maps/api/geocode/xml?sensor=false&ie=utf8&address=postal_code=73400,country=f...

View solution in original post

10 Replies
thanstad
Creator
Creator

Try this page http://www.findlatitudeandlongitude.com/batch-geocode/ it working good with more details than City only, but try and see if this giving you the right figures. Otherwise add more details, cut and paste and press geocode. You will receive a csv file you easly can read into QlikView.

Reagrds,

Tormod Hanstad

swuehl
MVP
MVP

I think you get the correct error code (ZERO_RESULTS) if you use postal_code instead of postal code in your GeoAdress strings, like

http://maps.google.com/maps/api/geocode/xml?sensor=false&ie=utf8&address=postal_code=73403,country=f...

vs.

http://maps.google.com/maps/api/geocode/xml?sensor=false&ie=utf8&address=postal code=73403,country=f...

P.S: seems like this is a CEDEX code that google can't assign a location. As an approximation for those locations, you can try rounding these codes to the hundres:

http://maps.google.com/maps/api/geocode/xml?sensor=false&ie=utf8&address=postal_code=73400,country=f...

Not applicable
Author

the postal_code is the solution indeed, thanks!

Not applicable
Author

Do you also know how I can avoid the 'OVER_QUERY_LIMIT'-status?

I can't test anymore now, it's still returning an 'OVER_QUERY_LIMIT'.

swuehl
MVP
MVP

Seems like you have exceeded your quota.

I think you already know, but please check:

The Google Geocoding API - Google Maps API Web Services — Google Developers

about usage limits.

Not applicable
Author

I solved it by connecting with a terminal server with another IP-address.

Not applicable
Author

Hi all,

While testing with a large number of addresses, i noticed that Google is not always returning the correct location.

I think that Google sometime makes it own combination of the address string.

If the address is not correct or Google cannot find this combination, i would like to see a 'zero_result' instead of another location that looks similar to that address.

There are 15.000 locations, so i can not check all of them and I would like to garantee to the customer that the locations are correct.

My stringcombination to Google is:

If there is a zipcode, country and no street available:

ApplyCodepage('zip_code='&ZipCode&',country='&Country,437)

if there is a street, zipcode and country available:

ApplyCodepage(Street&','&ZipCode&','&Country,437) as GeoAddress,

Is this correct?

Not applicable
Author

Hi, I am trying to use one of your methods to calculate the distance between 2 post codes, but it looks like I am doing something wrong. Can you kindly have a look? vCalc variable is not returning anything. Probably some problem with the alternate state?

Thanks,

Ram

Not applicable
Author

It's offline