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

py4e.com - Chapter 13 - Google geocoding web service/Exercise 1 #440

Open
darryl-a-peterson opened this issue May 1, 2024 · 0 comments
Open

Comments

@darryl-a-peterson
Copy link

The section "Google geocoding web service" in Chapter 13 has not been updated to match the code change from Google services to OpenStreetMap.

geojson.py has been commented to point the user to opengeo.py.

The instructions for Exercise 1 no longer match the format of the data being returned.
Exercise 1: "Change [geojson.py] (https://www.py4e.com/code3/geojson.py) to print out the two-character country code from the retrieved data."
OpenStreetMap returns the full country name and not a two-letter code.

Examples included below:

Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Ann+Arbor%2C+MI
Retrieved 1318 characters {"type":"FeatureColl
lat 42.2813722 lon -83.7484616
Ann Arbor, MI, United States of America

Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Birmingham%2C+England
Retrieved 1366 characters {"type":"FeatureColl
lat 52.4796992 lon -1.9026911
Birmingham, ENG, United Kingdom

Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Atlantic+Ocean
Retrieved 993 characters {"type":"FeatureColl
lat 13.581921 lon -38.320312
Atlantic Ocean

Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Zwanenburg
Retrieved 1261 characters {"type":"FeatureColl
lat 52.3779288 lon 4.7436402
Zwanenburg, NH, Netherlands

Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Reudnitz
Retrieved 1262 characters {"type":"FeatureColl
lat 51.4128223 lon 13.0692273
Reudnitz (Reudnitz), Saxony, Germany

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

No branches or pull requests

1 participant