gemgis.utils.create_zmap_grid#

gemgis.utils.create_zmap_grid(surface: pyvista.core.pointset.PolyData, cell_width: int, comments: str = '', name: str = 'ZMAP_Grid', z_type: str = 'GRID', nodes_per_line: int = 5, field_width: int = 15, nodata: Union[int, float] = - 9999.0, nodata2: Union[int, float, str] = '', decimal_places: int = 5, start_column: int = 1)#

Function to write data to ZMAP Grid, This code is heavily inspired by https://github.com/abduhbm/zmapio

Parameters
  • surface (pv.core.pointset.PolyData) – PyVista mesh

  • cell_width (int) – Width of grid cell, e.g. cell_width=50

  • comments (str) – Comments written to the ZMAP File, e.g. comments='Project: Einstein', default is ''

  • name (str) – Name of the ZMAP File, e.g. name='ZMAP_Grid', default is 'ZMAP_Grid'

  • z_type (str) – ZMAP Grid Type, e.g. z_type='GRID', default is 'GRID'

  • nodes_per_lines (int) – Number of values per line, e.g. nodes_per_line=5, default is 5

  • field_width (int) – Width of each field, e.g. field_width=15, default is 15

  • nodata (Union[int, float]) – No data value, e.g. nodata=-9999, default is -9999

  • nodata2 (Union[int, float, str]) – No data value, e.g. nodata2=-9999, default is ''

  • decimal_places (int) – Number of Decimal Places, e.g. decimal_places=5, default is 5

  • start_column (int) – Number of the start column, e.g. start_column=1, default is 1

Returns

lines – String containing the ZMAP Grid Data

Return type

str

New in version 1.0.x.