Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 2.29 KB

README.rst

File metadata and controls

58 lines (42 loc) · 2.29 KB

pandamesh

https://img.shields.io/github/workflow/status/deltares/pandamesh/ci?style=flat-square https://img.shields.io/codecov/c/github/deltares/pandamesh.svg?style=flat-square https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square

This package translates geospatial vector data (points, lines, or polygons) to unstructured meshes. The package converts geospatial data, presented as geopandas GeoDataFrames, to unstructured meshes using the open source high quality mesh generators:

  • Christophe Geuzaine and Jean-François Remacle's Gmsh
  • Jonathan Shewchuk's Triangle

utilizing the respective Python API's, available at:

For completeness, the source code of both projects can be found at:

These APIs are wrapped in two lightweight classes: pandamesh.TriangleMesher and pandamesh.GmshMesher. Both are initialized with a GeoDataFrame defining the geometry features of the mesh. During initialization, geometries are checked for overlaps and intersections, as the mesh generators cannot deal with these. Generated meshes are returned as two numpy arrays: the coordinates of the vertices, and the connectivity of the mesh faces to these vertices (as is usual for many unstructured grid representations).

GeoPandas is not suited for geometries that "wrap around" around the world. Consequently, this package cannot generate meshes for e.g. a sphere.

Installation

pip install pandamesh

Documentation

https://img.shields.io/github/workflow/status/deltares/pandamesh/docs?style=flat-square