Build cluster from multiple identical longitude and latitude coordinates
Project description
Cluster Coordinates
Given a longitude, and latitude, cluster_coords will create a new latitude and longitude randomly placing it anywhere between 5 and 25 meters from the original longitude and latitude. This is helpful when adding points to a map, you don't want to add a point directly on top of another point, so this module helps you create a cluster.
from cluster_coords import RandomCoord
longitude=-82.562800
latitude=27.488960
coords = RandomCoord(longitude,latitude).randomize_coords()
new_lat = coords.lat
new_lng = coords.lng
Installation
pip install cluster_coords
[sonnyparlin@localhost cluster_coords]$ python
Python 3.9.1 (default, Jan 20 2021, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cluster_coords import RandomCoord
>>> coords=RandomCoord(-82.562800,27.488960).randomize_coords()
>>> coords.lng
-82.56268860928326
>>> coords.lat
27.489076780986935
Code borrowed from Stack Exchange answer: here, answer by haakon-d.
This project is open source and is located here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cluster_coords-0.0.7.tar.gz
.
File metadata
- Download URL: cluster_coords-0.0.7.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6f70534f08639fe78597c4a141b71b086154dd0f4c1b004e9c149c255227a49 |
|
MD5 | 9a15f1c8eed87d1aaa26abe629c5e09f |
|
BLAKE2b-256 | d62d81e274c2df6c59ca86c7d79211a21a5b5ac3f8d8a25f3b92d8ee7785d462 |
File details
Details for the file cluster_coords-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: cluster_coords-0.0.7-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dddf531c12418471490d472964c42de738a9ec6bb99dfa8a12bf896018c03c8 |
|
MD5 | b712ffc503b1d0f9fb29380cd71462d2 |
|
BLAKE2b-256 | 9567140261ecea8ba3c1ff3c85c4ae800af1213b21e1bcb424dc40c7bfe2ab42 |