Skip to main content

Triangle mesh transforms

Project description

EmeraldTriangles

This library provides transformations for 2d triangle meshes built on top of scipy.spatial.Delaunay and Triangle:

  • Insert points (nodes) in an existing mesh, splitting any triangles that points fall into.
    • Meshes created this way might not be Delaunay, but any new connected set of triangles added will be Delaunay if viewed in isolation (without the pre-existing mesh).
  • Extend a mesh outwards to include new points.
    • The extension to the mesh will be a constrained delaunay.
  • Calculate the boundary polygon of a mesh.

This library uses a similar data structure to the Triangles library above, but replaces numpy arrays with pandas dataframes, preserving any extra columns across operations. It also contains a plotting function similar to the one in the Triangle library, that supports color attributes for vertices as well as triangle faces.

In addition, EmeraldTriangles provides import and export functionality for

  • LandXML (import and export, no extra columns)
  • SQL (import and export, same supported databases as pandas)
  • PyVista (Only export)
    • VTK (only export)

as well as some data transforms

  • Reprojection of coordinates using pyproj
  • Spatial interpolation (Kriging) of data using scikit-gstat
  • Sampling of data from a raster to triangulation vertices using RasterIO
  • Sampling of data from a triangulation to new point locations (linear interpolation between vertices of the surrounding triangle)

Documentation

Documentation is provided in the form of a jupyter notebook with example usages as well as in docstrings accesible with the python help() function.

Installation tips

Users have experience issues with using the setup.py develop option due to some strange behaviour from cython. Using pip instead seems to do this trick.

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

emeraldtriangles-0.1.7.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emeraldtriangles-0.1.7-cp312-cp312-macosx_15_0_arm64.whl (81.0 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file emeraldtriangles-0.1.7.tar.gz.

File metadata

  • Download URL: emeraldtriangles-0.1.7.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for emeraldtriangles-0.1.7.tar.gz
Algorithm Hash digest
SHA256 4f5af7885ce175939a5a194369245eef6b8ce66a0c9fb4c4958662d7989761dc
MD5 eddea55f884bfd6a1849eff332cdb2d5
BLAKE2b-256 13d474df18ade658f6bcde3ac6354ace8598a21523049129688a2870a91a256f

See more details on using hashes here.

File details

Details for the file emeraldtriangles-0.1.7-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for emeraldtriangles-0.1.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b25227faa05e98b0d6a03aefff220bc5eca8a6b8583465248c2204660b7b38d2
MD5 fc298b83b3bbb44276810d4c91224875
BLAKE2b-256 f55d37ac48eb3c4b73398927adabf0441d21832d345a7b7a2bff0413ec7f39a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page