geolocation

Python: Getting the user's country automatically?

Python: Getting the user's country automatically? Question: There’s probably an easy way to do this with some API, but web programming is not my forte. How can I figure out the user’s country in Python? I need to use an OS-agnostic solution, and I’d prefer to only have to use the standard library. Is there …

Total answers: 4

Check if a geopoint with latitude and longitude is within a shapefile

Check if a geopoint with latitude and longitude is within a shapefile Question: How can I check if a geopoint is within the area of a given shapefile? I managed to load a shapefile in python, but can’t get any further. Asked By: Gerald Bäck || Source Answers: One way to do this is to …

Total answers: 7

How to calculate the area of a polygon on the earth's surface using python?

How to calculate the area of a polygon on the earth's surface using python? Question: The title basically says it all. I need to calculate the area inside a polygon on the Earth’s surface using Python. Calculating area enclosed by arbitrary polygon on Earth's surface says something about it, but remains vague on the technical …

Total answers: 10

Obtain Latitude and Longitude from a GeoTIFF File

Obtain Latitude and Longitude from a GeoTIFF File Question: Using GDAL in Python, how do you get the latitude and longitude of a GeoTIFF file? GeoTIFF’s do not appear to store any coordinate information. Instead, they store the XY Origin coordinates. However, the XY coordinates do not provide the latitude and longitude of the top …

Total answers: 2

What python libraries can tell me approximate location and time zone given an IP address?

What python libraries can tell me approximate location and time zone given an IP address? Question: Looking to implement better geo-location with Python. Asked By: ensnare || Source Answers: It is not a Python lib. But http://ipinfodb.com/ provides a webservice that can be easily wrapped by Python code with urllib for example. http://api.ipinfodb.com/v3/ip-city/?key=<your_api_key>&ip=74.125.45.100 http://api.ipinfodb.com/v3/ip-country/?key=<your_api_key>&ip=74.125.45.100 You …

Total answers: 14