geotoolkit
A lightweight python library for working with geographic coordinates. This library can be used in things such as drone navigation, speed measurement, and more.
Examples
Measuring distance between two points:
p1 = (33.93369079118477, -118.41900963926824)
p2 = (33.937366248549935, -118.38276824755901)
distance = distance(p1, p2)
print(distance) # 2.0952233910697995, in miles
Checking if a point lies within (inside of) a polygon:
raw_json:str = "[[34.04709656460684, -118.51420813970792], [34.0173210880725, -118.00731306657742], [33.92068010802825, -117.92185949106074], [33.695565897860064, -118.00828413031054], [33.693142098170746, -118.38020139809352]]" # load a polygon from a JSON array of arrays
polygon:list[tuple[float, float]] = load_polygon(raw_json)
point1:tuple[float, float] = (33.924709007544834, -118.22191807002923)
point2:tuple[float, float] = (33.88682983206357, -118.72492888526082)
print(inside_polygon(point1, polygon)) # True (it is within the polygon)
print(inside_polygon(point2, polygon)) # False (it is outside of the polygon)
Measuring speed:
mph = speed_mph((33.92533554514059, -118.32099118005947), (33.92532143656184, -118.31715080400728), 9.8)
print(mph) # 80.96760998067498 MPH
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geotoolkit-0.2.1.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geotoolkit-0.2.1.tar.gz.
File metadata
- Download URL: geotoolkit-0.2.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
997ce018d6c5c3baffbc4022a4bb673e3efceea0a24abe511a8ec801278be9f9
|
|
| MD5 |
21a87bd11f4e455aee369b47ad578a91
|
|
| BLAKE2b-256 |
20d4acd4c3cfb752c8f4ec821e47f2fdd8c0eb76b67c98fecd3aa3e510e3e2b4
|
File details
Details for the file geotoolkit-0.2.1-py3-none-any.whl.
File metadata
- Download URL: geotoolkit-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a0ff4aae9239ad08c2044feb40b525c59fb2790ed19779a4670c13dd808ee0f
|
|
| MD5 |
084a09b22723936e8e3147dd23454622
|
|
| BLAKE2b-256 |
e27f5d031b81b9065753e09d45e1169869c9c1631f732ff259299daa7db9dadc
|