Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gisalgs/geom
:zap: Algorithms for geometric operations
https://github.com/gisalgs/geom
algorithm geometry
Last synced: 3 months ago
JSON representation
:zap: Algorithms for geometric operations
- Host: GitHub
- URL: https://github.com/gisalgs/geom
- Owner: gisalgs
- Created: 2015-10-04T04:31:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T06:53:02.000Z (11 months ago)
- Last Synced: 2024-07-03T23:46:03.074Z (4 months ago)
- Topics: algorithm, geometry
- Language: Python
- Homepage:
- Size: 66.4 KB
- Stars: 58
- Watchers: 3
- Forks: 40
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :sunglasses: Code for geometric algorithms
This is no formal installation for this package (or any packages in `gisalgs`). However, installing the code is not complicated. It is important to organize everything in a directory and each package such as `geom` is a subdirectory. Now suppose we use the directory at the root called `/lib` to store everything and we create a subfolder called `gisalgs` there. Under the `/lib/gisalgs` directory, create a subdirectory called `geom` and save all the files in this repository in geom. It will be essential to have the `__init__.py` in geom (this is just an empty file with the specific file name). Lastly, make sure to copy `__init__.py` to the parent directory (in this case, `/lib/gisalgs`).
:zap: The following is an example of using modules in this repository:
```python
import sys
sys.path.append('/lib/gisalgs')from geom.point import *
p, p1, p2 = Point(10,0), Point(0,100), Point(0,1)
print(p.distance(p1))
print(p1)
```