A Delaunay triangulator for terrains
Project description
startinpy
Python bindings for startin, a Delaunay triangulator for the modelling of terrains.
Installation
pip
To install the latest release: pip install startinpy
If you want to compile it yourself
- install latest Rust
- install maturin
maturin build --release
cd ./target/wheels/
pip install [name-wheel].whl
will install it to your local Python
Development
- install Rust (v1.39+)
- install maturin
maturin develop
- move to another folder, and
import startinpy
shouldn't return any error
Documentation
Examples
import startinpy
import numpy as np
#-- generate 100 points randomly in the plane
rng = np.random.default_rng()
pts = rng.random((100, 3))
pts = pts * 100
dt = startinpy.DT()
dt.insert(pts)
#-- remove vertex #4
try:
dt.remove(4)
except Exception as e:
print(e)
print("# vertices:", dt.number_of_vertices())
print("# triangles:", dt.number_of_triangles())
print("CH: ", dt.convex_hull())
print(dt.is_triangle([4, 12, 6]) )
print(dt.is_triangle([5, 12, 6]) )
print("--- /Points ---")
for each in dt.points:
print(each)
print("--- Points/ ---")
alltr = dt.triangles
print(alltr[3])
try:
zhat = dt.interpolate_tin_linear(55.2, 33.1)
print("result: ", zhat)
except Exception as e:
print(e)
It can read LAS/LAZ and output GeoJSON files too:
import startinpy
t = startinpy.DT()
t.read_las("/home/elvis/myfile.laz")
print("# vertices:", t.number_of_vertices())
print("# triangles:", t.number_of_triangles())
t.write_geojson("/home/elvis/output.geojson")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for startinpy-0.9.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f0af73297d8436da0a597ec809222eef691ec6edf65bb1cf522701b288b4ad2 |
|
MD5 | 1a727c8151a0c4ef6a2a817f83d14230 |
|
BLAKE2b-256 | d55ca30b6464825879302d3f4882b4652dcef81b709e4cfdd7f6ba78ba90a207 |
Close
Hashes for startinpy-0.9.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db249d9a812dd898b4d63bdaa5e8e583fbb786a94343eeae515ee63010ab8fa |
|
MD5 | 999550f0a7824d06524b265705f94ca4 |
|
BLAKE2b-256 | 7ff636b2618720ab7fb0388bc9c057b7f87a7978a50cfcef9b3be860441b12c6 |
Close
Hashes for startinpy-0.9.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de787c7be038e1650f0cb098504444ec984c395f5e2c1b27ed1e1a7ca4bf4600 |
|
MD5 | 1e2278126600ba17668f8bad95583233 |
|
BLAKE2b-256 | 55a19f4ac7f2da448a72c46f69b6787d4be3fcd8985e8108bc704ac55972765f |
Close
Hashes for startinpy-0.9.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c9fa9586810557dbf39ae45676e5c379d814555e547235a817e2a9b61bcb85b |
|
MD5 | b4bb6616062853726bd4dba89d8ed669 |
|
BLAKE2b-256 | cbdf28cd4b7ec9b0e4459da14bfc546434150a4fd76df2a3ab53502271b0db02 |
Close
Hashes for startinpy-0.9.1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36dcd6739a16ff64746d092232d361d77206e7da6b1845090cc5d5434e35dbac |
|
MD5 | 3bec2d2fca26cd4c48947b674f92fb99 |
|
BLAKE2b-256 | 8e3a76fc9641b9841bfab2ac2463ba47344937efcdd92cefcda8bdb96d9fad93 |
Close
Hashes for startinpy-0.9.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c253b48bc83ee4173f0fcbd3e63ad45653404b0f8ee82258515f08577b3947f |
|
MD5 | 8ce5209fbf8c67ffeb893c72779bf597 |
|
BLAKE2b-256 | 4819a046ca767123ea82bc70433a33136c504b185f3cf91fb6620e9fb443a9fe |