gemgis.visualization.create_delaunay_mesh_from_gdf
gemgis.visualization.create_delaunay_mesh_from_gdf#
- gemgis.visualization.create_delaunay_mesh_from_gdf(gdf: geopandas.geodataframe.GeoDataFrame, z: str = 'Z') pyvista.core.pointset.PolyData #
Creating a delaunay triangulated mesh from surface contour lines
- Parameters
gdf (gpd.geodataframe.GeoDataFrame) – GeoDataFrame containing LineStrings representing surface contours
- Returns
mesh – Mesh representing the triangulated mesh
- Return type
pv.core.pointset.PolyData
New in version 1.0.x.
Example
>>> # Loading Libraries and File >>> import gemgis as gg >>> import geopandas as gpd >>> gdf = gpd.read_file(filename='file.shp') >>> gdf OBJECTID Z EINHEIT Shape_Leng geometry 0 1.00 -2450 gg_kru_b_l_Z50m 3924.67 LINESTRING (32403313.109 5785053.637, 32402917... 1 2.00 -2400 gg_kru_b_l_Z50m 26332.90 LINESTRING (32410198.859 5781110.785, 32409807... 2 3.00 -2350 gg_kru_b_l_Z50m 31104.28 LINESTRING (32409587.930 5780538.824, 32408824... 3 4.00 -2300 gg_kru_b_l_Z50m 35631.73 LINESTRING (32408977.008 5779966.863, 32408808... 4 5.00 -2250 gg_kru_b_l_Z50m 41702.52 LINESTRING (32407319.922 5779788.672, 32407246...
>>> # Creating PolyData from isolines >>> mesh = gg.visualization.create_delaunay_mesh_from_gdf(gdf=gdf) >>> mesh Header PolyData Information N Cells 45651 N Points 23009 X Bounds 3.233e+07, 3.250e+07 Y Bounds 5.702e+06, 5.798e+06 Z Bounds -2.450e+03, 4.000e+02 N Arrays 1 Data Arrays Name Field Type N Comp Min Max Depth [m] Points float64 1 -2.450e+03 4.000e+02
See also
create_polydata_from_msh
Creating PolyData dataset from Leapfrog mesh file
create_polydata_from_ts
Creating PolyData dataset from GoCAD Tsurface file
create_polydata_from_dxf
Creating PolyData dataset from DXF object