Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased#
[0.2.2] 2024-09-26#
Fixed#
Version 0.2.1 introduced new logic relying on geopandas 1.0+ shapely-wrapped functions, breaking compatibility with earlier geopandas versions. These method calls have been replaced with direct shapely functions, ensuring compatibility with older versions such as geopandas 0.14.
[0.2.1] 2024-09-04#
Added#
Added
find_proximate_perimeter_points()
to identify (near) dangling edges and extremely short edges in polygon perimeters.
Changed#
Added a
minimum_perimeter_spacing
keyword topandamesh.TriangleMesher
andpandamesh.GmshMesher
to define a tolerance for (near) dangling edges and very short edges in polygon perimeters. This tolerance is set to 1.0e-3 by default; it means that the meshers will error during initialization if slivers of 0.001 or thinner are found, or if consecutive vertices are within 0.001 of each other.
[0.2.0] 2024-09-03#
Fixed#
Previously,
pandamesh.TriangleMesher
would not respect specified cell sizes in areas that are fully bounded by linestrings (rather than polygons), e.g. three separate lines forming a triangular zone. The reason is that Triangle identifies such a zone as a separate region, and the point specifying the maximum area is isolated. This has been fixed by checking whether linestrings form any coincendental polygons, and including these polygons are separate zones.
Added#
pandamesh.TriangleMesher.generate_geodataframe()
and -pandamesh.GmshMesher.generate_geodataframe()
have been added to return generated meshes as geodataframes.Added
pandamesh.MeshAlgorithm.QUASI_STRUCTURED_QUAD
as an option.Added
pandamesh.Preprocessor
to assist in preparing and cleaning geospatial data prior to meshing.Added
pandamesh.GmshMesher.add_threshold_distance_field()
,pandamesh.GmshMesher.add_matheval_distance_field()
,pandamesh.GmshMesher.add_structured_field()
, andpandamesh.GmshMesher.add_structured_field_from_dataarray()
to enable Gmsh fields from geometry or from raster data.Added
finalize
keyword topandamesh.GmshMesher.generate()
to automatically finalize after mesh generation.Added
pandamesh.find_edge_intersections()
to locate unresolved intersection between polygon boundary, linestring, and linearring edges.
Changed#
pandamesh.TriangleMesher
does a cell size to area conversion. This previously assumed right-angled triangles. This has been changed to assume equilateral triangles instead. This may result in slightly smaller triangles.Mesher properties set with
pandamesh.DelaunayAlgorithm
,pandamesh.FieldCombination
,pandamesh.GeneralVerbosity
,pandamesh.GmshMesher
,pandamesh.MeshAlgorithm
, orpandamesh.SubdivisionAlgorithm
will now accept one of these enums, or the enum member name as a string.pandamesh.TriangleMesher
andpandamesh.GmshMesher
now take ashift_origin
argument to temporarily shift the coordinate system to the centroid of the geometries’ bounding box to mitigate floating point precision problems. This is enabled by default.pandamesh.gmsh_env()
now finalizes an existing Gmsh instance prior to initializing Gmsh anew.pandamesh.TriangleMesher
andpandamesh.GmshMesher
will now also accept LinearRing geometries (previously only Polygons, LineStrings, and Points).Added an
edge_intersection
keyword topandamesh.TriangleMesher
andpandamesh.GmshMesher
to control whether to error, warn, or ignore unresolved edge intersections of polygon boundaries, linestrings, and linearrings. By default, both meshers will now error if unresolved intersections are encountered.
[0.1.6] 2024-07-17#
Added#
pandamesh.GmshMesher
now takesread_config_files
andinterruptible
as initialization arguments forgmsh.
.
Fixed#
Compatibility changes for Numpy 2.0.
[0.1.5] 2024-02-06#
Fixed#
Inside of
pandamesh.GmshMesher
a check now occurs before finalization. This keepsgmsh
from printing (harmless) errors to the console, which previously commonly happened at initialization.pandamesh
can now be imported in a sub-thread.gmsh
will not run outside of the main interpreter thread, but it previously also prevented the entire import ofpandamesh
. Attempting to use thepandamesh.GmshMesher
outside of the main thread will result in aRuntimeError
.
Added#
pandamesh.GeneralVerbosity
has been added to control the verbosity of Gmsh. It can be set via theGmshMesher.general_verbosity
property. Its default value isSILENT
.
Changed#
A number of deprecations have been fixed. Most notable is the deprecation of
geopandas.datasets
. The South America geodataframe can now be fetched viapandamesh.data.south_america()
.Checking of intersections of linestrings has currently been disabled: the current implementation is too strict and resulted in too many false positives.