Skip to main content

PyPI docs GitHub license

startinpy

A library for modelling and processing 2.5D terrains using a (2D) Delaunay triangulation. The triangulation is computed in 2D, but the z-elevation of the vertices are kept.

The underlying code is written in Rust (so it's rather fast) and robust arithmetic is used (so it shouldn't crash). startinpy uses the startin Rust library and adds several utilities and functions, for instance NumPy support for input/output, exporting to several formats, and easy-of-use.

startinpy allows you to:

  1. insert incrementally points
  2. delete vertices (useful for simplification, interpolation, and other operations)
  3. interpolate with several methods: TIN, natural neighbours, IDW, Laplace, etc.
  4. use other useful terrain Python libraries that are also NumPy-based, eg laspy, rasterio, meshio
  5. output the TIN to several formats: OBJ, PLY, GeoJSON, and CityJSON
  6. store extra attributes with the vertices (the ones from LAS/LAZ)

Documentation

https://startinpy.rtfd.io

Installation

pip

To install the latest release: pip install startinpy

(watch out: this does not work with Linux currently, it installs an old version!)

If you want to compile it yourself

  1. install latest Rust
  2. install maturin
  3. maturin build --release
  4. cd ./target/wheels/
  5. pip install [name-wheel].whl will install it to your local Python

Development

  1. install Rust (v1.39+)
  2. install maturin
  3. maturin develop
  4. move to another folder, and import startinpy shouldn't return any error

Testing

To run the automated test suite:

  1. install the test requirements: pip install -r tests/requirements.txt
  2. pytest

Examples

The folder ./demo contains a few examples.

import laspy
import numpy as np
import startinpy

las = laspy.read("../data/small.laz")
pts = np.vstack((las.x, las.y, las.z)).transpose()

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 the vertices forming the convex hull, in CCW-order
print("CH: ", dt.convex_hull())

# -- fetch all the incident triangles (CCW-ordered) to the vertex #235
vi = 235
one_random_pt = dt.points[vi]
print("one random point:", one_random_pt)
print(dt.incident_triangles_to_vertex(vi))

# -- interpolate at a location with the linear in TIN method
zhat = dt.interpolate({"method": "TIN"}, [[85718.5, 447211.6]])
print("result: ", zhat[0])

If you use this software, please cite this article

@article{Ledoux24,
  author = {Ledoux, Hugo},
  title = {{startinpy}: {A} {P}ython library for modelling and processing {2.5D} triangulated terrains},
  journal = {Journal of Open Source Software},
  year = {2024},
  volume = {9},
  number = {103},
  pages = {7123},
  doi = {10.21105/joss.07123}
}

Metadata

Release files for startinpy 0.12.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for startinpy 0.12.3
File
startinpy-0.12.3-cp314-none-win_amd64.whl CPython 3.14 none Windows x86-64 Details
startinpy-0.12.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
startinpy-0.12.3-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
startinpy-0.12.3-cp313-none-win_amd64.whl CPython 3.13 none Windows x86-64 Details
startinpy-0.12.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
startinpy-0.12.3-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
startinpy-0.12.3-cp312-none-win_amd64.whl CPython 3.12 none Windows x86-64 Details
startinpy-0.12.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
startinpy-0.12.3-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
startinpy-0.12.3-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details
startinpy-0.12.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
startinpy-0.12.3-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
startinpy-0.12.3-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
startinpy-0.12.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
startinpy-0.12.3-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 6.0 MB

Release files / startinpy-0.12.3-cp314-none-win_amd64.whl

Download URL startinpy-0.12.3-cp314-none-win_amd64.whl
Size 333.6 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
40dc171a37f6b50e56d727771f2375dcdcd30ea5b8365550ced8df47b9629381
BLAKE2b-256 checksum
How to use checksums
c47b1fc35b3bb154229c43533b11d53a25bd08ace6533035fa94fee9aa96be0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL startinpy-0.12.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 499.4 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0cf8fe4149b03b99d98d9b7fd47ad8614b2e9df162c9c8dd05f99e3746c9b6fc
BLAKE2b-256 checksum
How to use checksums
54174fedfee2174162e9016ee50c6f2063495ffdaf03131c98345ff970cf87b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp314-cp314-macosx_11_0_arm64.whl

Download URL startinpy-0.12.3-cp314-cp314-macosx_11_0_arm64.whl
Size 373.7 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
38ae75fe714cf8ae262a9219d5b543f0ba1c097a397df76fd0a451c62575af6e
BLAKE2b-256 checksum
How to use checksums
bf6417ac70dfc33259754c1c4299cc75a36dd3ddbc562cffa062c0ebda32355b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp313-none-win_amd64.whl

Download URL startinpy-0.12.3-cp313-none-win_amd64.whl
Size 333.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
c60b7207b4744b191723c0c4b4b18f422b736471e945578891667b45a489ed31
BLAKE2b-256 checksum
How to use checksums
0d43ed755670ab8fdce6796afc0184084fc11b246ce9b7b99c9966d4724fd6b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL startinpy-0.12.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 499.4 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a8d9f4bff9c5a602e6af47d897e3e4fd5905ff74d468afa1ec8b191797b1e90f
BLAKE2b-256 checksum
How to use checksums
4f53e667768c0b44713641a96ae807ec791fc012b5f173c15a76e18250184755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp313-cp313-macosx_11_0_arm64.whl

Download URL startinpy-0.12.3-cp313-cp313-macosx_11_0_arm64.whl
Size 373.7 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a802b0032c9d1036b231cbf32c95fa19863ab73ecfc21dc194552e2e7a117f72
BLAKE2b-256 checksum
How to use checksums
24d1b38fb73fb7131abe9ab5caee4b7b21dc5ca6695a5df56bcbac8dad0ee20c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp312-none-win_amd64.whl

Download URL startinpy-0.12.3-cp312-none-win_amd64.whl
Size 333.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
dbe43d19b08baeba4596b1f0abed209136a76cb4424636e51967e2a8217cd914
BLAKE2b-256 checksum
How to use checksums
b71b6e65fa520e727cfbcaa8d4c1cfee0760edd5f0694c9d5f021203d3ea4543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL startinpy-0.12.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 499.4 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
cd29839cd0231cb4417e3ef4f32fb1e050787ae0cdb18e570b995f9e027f8945
BLAKE2b-256 checksum
How to use checksums
40aabb191ab65759f3954a9280b5573abdcd79658d4af5528b17fbe1d00751f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp312-cp312-macosx_11_0_arm64.whl

Download URL startinpy-0.12.3-cp312-cp312-macosx_11_0_arm64.whl
Size 373.7 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
46302250118a5e4345acbd8f77c0b33a895cdc50a4748703c50384aa13f59bb7
BLAKE2b-256 checksum
How to use checksums
09ffad12e25a927e701610fd204e7a4517c7d7756b92a3b0405d44ad280aa13c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp311-none-win_amd64.whl

Download URL startinpy-0.12.3-cp311-none-win_amd64.whl
Size 334.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
82d9d970dfdecceabd980940656a658adee4a7675ed558e9de2ba453755a6b5c
BLAKE2b-256 checksum
How to use checksums
abf7da7a837a445ca662faa32383d96664bc9aa64c8153e12e94ee45fe5c03e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL startinpy-0.12.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 498.5 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
899b8b2d3048ab9565a34eb37887575b2eea2361ede40f4d4fcd1207ed264601
BLAKE2b-256 checksum
How to use checksums
c465478f37002574df3885fa548290894c05b91a0fa29287e81ae31cbc8efdf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp311-cp311-macosx_11_0_arm64.whl

Download URL startinpy-0.12.3-cp311-cp311-macosx_11_0_arm64.whl
Size 373.3 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e7d59c0a8a2f26123fda46ff25a30adfd9fa4a3156df7dbfb64e78b136ff4ed3
BLAKE2b-256 checksum
How to use checksums
c8bbf48b8e525a0901b8cdca7e78e82875fbd9d3988a626bb79cfa452397469f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp310-none-win_amd64.whl

Download URL startinpy-0.12.3-cp310-none-win_amd64.whl
Size 334.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
69284c0676d2ff59ce73e78df8a842465d109b09cf15438e804c5bc4f26913cd
BLAKE2b-256 checksum
How to use checksums
cbcfc9d0b6cf8c1dd911adf7e57f2a98a795651ae26a74a2da282ba4286a169c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL startinpy-0.12.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 498.4 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
051e2b791d57aab1449e1d9a5bcabe3743c28c4e4c7bb7e35b78bf3afb6f8bda
BLAKE2b-256 checksum
How to use checksums
cd0444d5a7165196d7b985e1a80b6e5dadf7755e6ca189ac16350fb408029c95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release files / startinpy-0.12.3-cp310-cp310-macosx_11_0_arm64.whl

Download URL startinpy-0.12.3-cp310-cp310-macosx_11_0_arm64.whl
Size 373.3 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
916a86cd0f73d0d94963f402a90a2ab962a49834e8a79a3860dcb8aff44135ec
BLAKE2b-256 checksum
How to use checksums
b23dbe235fffa16f43e1caa03baf869f79284180fe392aa388f063af2b13440b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.6.0

Release history Release notifications | RSS feed

This release

0.12.3 This release

15 release files

0.10.0

8 release files

0.9.2

8 release files

0.9.1

6 release files

0.9.0

6 release files

0.8.0

13 release files

0.7.8

13 release files

0.7.7

13 release files

0.7.6

8 release files

0.7.5

8 release files

0.7.2

8 release files

0.7.1

8 release files

0.7.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page