Geocoding/Geolocation

Introduction

Mapbox vs. Google Maps vs. OpenStreetMap APIs: Finding the Perfect Fit for Your Next App

What is OpenStreetMap and how it is better than Google Maps

Use the Following Values for Your Calculations

3.14159pi
24875.11circumference of Earth in miles
based on global average radius
40030.14circumference of Earth in kilometers
based on global average radius
3959radius of Earth in miles
global average (wikipedia)
6371radius of Earth in kilometers
global average (wikipedia)
5280feet per mile
3.28084feet per meter
1.60934kilometers per mile
1000meters per kilometer
360degrees in a circle
60minutes per degree
60seconds per minute

Project #1

How far (great circle distance) is it from your location to:

In a table, report the two locations (name, lat, lon) and the distance between them. Round the lat/lon to fit the table.)
(Create a table using f strings or a PySimpleGUI.)

Project #2

Create an interact program to calculate the great circle distance

  1. ask the user for a starting location
  2. loop
    1. ask the user for a destination location
    2. calculate the great circle distance
    3. display the distance

Start with a simple menu driven program. When this is working convert it to a GUI.

Calculate Great Circle Distance

Using latitude/longitude, calculate the distance between two locations on the earth.

See the Python code HERE

OpenStreetMap

OpenStreetMap Wiki
OpenStreetMap Wiki: Downloading data
Working with OpenStreetMap in Python
OSMPythonTools
Loading Data from OpenStreetMap with Python and the Overpass API
Exploring OpenStreetMap using Pandas and the Python API
Accessing OSM Data in Python
Get coordinates of nodes using OSM id's
Schema (OSM Wiki)
Database (OSM Wiki)
Openstreetmap-website/Database schema
The OpenStreetMap data model
Mapping with OpenStreetMap
Node (OSM Wiki)
Way (OSM Wiki)
3 Ways to get OpenStreetMap(OSM) Data
Overpass API
Welcome to Python Overpass API’s documentation!

geopy

geopy (home)
5 minute intro to Open-source Geocoding with Python and Geopy - Calculate Latitude & Longitude

Links

Top 10 Best IP Geolocation APIs (in 2023)
Free IP Geolocation API and Accurate IP Lookup Database
Geocoding in Python: A Complete Guide
OSMNx : get coordinates of nodes using OSM id
Support for Retrieving OSM NodeIds in Map Matching