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
coords = RandomCoord(<lomgitude>,<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(-87,40).randomize_coords()
>>> coords.lng
-86.9997771932092
>>> coords.lat
40.00013474729262
Code borrowed from Stack Exchange answer:
https://gis.stackexchange.com/questions/2951/algorithm-for-offsetting-a-latitude-longitude-by-some-amount-of-meters
by (haakon-d) https://gis.stackexchange.com/users/260/haakon-d
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
cluster_coords-0.0.2.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for cluster_coords-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5197972abd725fad6f6bcf42f7846a36551fdca85d1eab7c2db3982b7775eee7 |
|
MD5 | c67a5acbef850257cb61fbce13226122 |
|
BLAKE2b-256 | 30a5ebcf2d0b366c89a7cfe81f9353b61df5222a0cfddd544f1419624688ba89 |