Reputation: 300
I have already installed certificates (used this advice from a different thread) .Here's the code and the result
from geopy.geocoders import ArcGIS
nom = ArcGIS()
location=nom.geocode("3995 23rd st, San Francisco, CA 94114",timeout=180)
print(location)
What's the problem? I am not getting results for longitude/latitude. how to get the results?
Please help.
Upvotes: 0
Views: 1014
Reputation: 1040
Using your code,
>>> print(location)
3995 23rd St, San Francisco, California, 94114
>>> location
Location(3995 23rd St, San Francisco, California, 94114, (37.752990821253434, -122.43170235858965, 0.0))
The points are in there, but print()
doesn't print them, just the address text string associated with them.
location
is basically a dictionary of the results returned by the geocoding service.
>>> type(location)
<class 'geopy.location.Location'>
>>> location.latitude
37.752990821253434
>>> location.longitude
-122.43170235858965
here are the docs for the location class the results are stored in.
Upvotes: 0