gemgis.visualization.create_polydata_from_dxf
gemgis.visualization.create_polydata_from_dxf#
- gemgis.visualization.create_polydata_from_dxf(gdf: geopandas.geodataframe.GeoDataFrame) pyvista.core.pointset.PolyData #
Converting loaded DXF object to PyVista PolyData
- Parameters
gdf (gpd.geodataframe.GeoDataFrame) – GeoDataFrame containing the faces/polygons of the loaded DXF object
- Returns
polydata – PyVista PolyData containing the mesh values
- Return type
pyvista.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.dxf') >>> gdf geometry 0 POLYGON Z ((1.00869 0.92852 1.00000, 0.97744 0... 1 POLYGON Z ((1.00869 0.92852 1.00000, 1.01735 0... 2 POLYGON Z ((0.97744 0.92853 1.00000, 0.94619 0... 3 POLYGON Z ((0.97744 0.92853 1.00000, 0.98610 0... 4 POLYGON Z ((0.94619 0.92853 1.00000, 0.91494 0...
>>> # Creating PolyData from dxf file >>> polydata = gg.visualization.create_polydata_from_dxf(gdf=gdf) >>> polydata PolyData Information N Cells 98304 N Points 393216 X Bounds -1.576e+00, 2.530e+00 Y Bounds -9.751e+00, 1.000e+00 Z Bounds -9.167e-01, 1.000e+00 N Arrays 0
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_structured_grid_from_asc
Creating StructuredGrid vom ESRI ASC Grid
create_structured_grid_from_zmap
Creating StructuredGrid vom Petrel ZMAP Grid
create_delaunay_mesh_from_gdf
Create Mesh from GeoDataFrame containing contour lines