Given a pair of latitude and longitude values (coordinate), a country name (e.g. United States) and a radius (e.g. 10 km), I would like to check if the coordinate is located close to the border of the country (i.e. if (parts of) the border is located within the predefined radius).
My current approach is just an approximation and needs to call costly geocoding APIs: Using the radius, I'm "sketching" an artificial circle around the coordinate (not a full circle, but e.g. 16 points arranged in a circle) and check for each of the points via Geocoding API, if it is located in the predefined country.
Is there a smarter way to do this in Python?