Skip to main content

From geodataframe to mesh

Project description


.. image:: :target: .. image:: :target: .. image:: :target:

This package translates geospatial vector 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.


.. code:: console

pip install pandamesh


.. image:: :target:

.. _geopandas: .. _GeoDataFrames: .. _Gmsh: .. _Triangle: .. _usual:

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

pandamesh-0.1.0.tar.gz (22.2 kB view hashes)

Uploaded source

Built Distribution

pandamesh-0.1.0-py3-none-any.whl (25.8 kB view hashes)

Uploaded py3

Supported by

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