0

Hello I currently have a great geocoder I built in python using googles geocoder API service. It works great, but the issue that does not work great is that it will not correctly geocode intersecting addresses that are given in the CSV file for example:

9th & Upshur St NW
Park Rd & Holmead Pl NW
14th & Girard St NW
10th & K St NW

The & sign in the addresses are causing an issue when geocoding and resulting in random coordinates.

Is these a work around or way to read these intersecting addresses with & sign splitting the 2 addresses?

thanks

1 Answers1

0

You should URL encode the query string. After URL encode special symbols will be converted. For example & will be converted to %26. Resulting request should be something like:

https://maps.googleapis.com/maps/api/geocode/json?address=9th%20%26%20Upshur%20St%20NW&key=YOUR_API_KEY

Have a look at this question to figure out how to URL encode query string in python:

How to urlencode a querystring in Python?

Hope this helps!

xomena
  • 31,125
  • 6
  • 88
  • 117