modules.geoDataProcess
Classes
- class modules.geoDataProcess.ExportGeoSectionsByBores
Export Geo cross-section for CAD drawing by Bores using its layer_number.
If there is no layer number or not using layer number, layer number will be generated automatically.
- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'ExportGeoSectionsByBores', auto_run: bool = True, bores: PortTypeHint.MultiProfile1D | None = None, material_table: PortTypeHint.MaterialTable | None = None, poly_lines: PortTypeHint.TableData | None = None, terrain_lines: PortTypeHint.TableData | None = None, use_layer_num: bool = True, terrain_lines_required: bool = True, projected_bores: dict[str, list[str]] | None = None, user_defined_projections: dict[str, dict[str, tuple[float, float]]] | None = None, terrain_bores_alignment: bool = False, output_3d_sections: bool = True, pinch_type: int = 1, merge: bool = False, eps: float = 0.01, decimal: int = 3) None
Initialize ExportGeoSectionByBores object.
Parameters
- boresPortTypeHint.MultiProfile1D | None, default: None
The vertical bores to create geo sections.
- material_tablePortTypeHint.MaterialTable | None, default: None
The materials information used for CAD drawing.
- poly_linesPortTypeHint.TableData | None, default: None
Poly line vertices that define section traces.
- use_layer_numbool, default: True
Whether to use layer number. If False, layer number will be generated automatically by material name.
- terrain_lines_requiredbool, default: True
Whether to require terrain lines from
InputTerrainLines.If True, the terrain lines must be provided.
If False, the terrain lines will be ignored.
projected_bores: dict[str, list[str]] | None, default: None Valid only when section traces are XY point-defined. The bore names to project on each section line. Key is the section name and value is the list of bore names to project.
Examples
{ "1-1": { "zk1": (100.0, 100.0), "zk2": (200.0, 200.0), }, "2-2": { "zk4": (300.0, 300.0), "zk5": (400.0, 400.0), }, }Notes
the projection will be overridden by user_defined_projections. terrain_bores_alignment: bool, default: False Valid only when section traces are XY point-defined. Whether to align the top of the projected bores with the terrain lines. If True, the top of the projected bores will be aligned with the terrain lines at the same chainage. If False, the top of the projected bores will be kept unchanged. pinch_type: int, default: 1 The pinch type. Only one type is supported by far. 1: 孔上尖灭 merge: bool, default: False Whether to merge the area with same material adjacent to each other. Originally, the area is cutted to different parts by the bore lines. eps: float The epsilon value. Used for merging close points. decimal: int, default: 3 The precision of the distance between bore lines. Ports InputMultiProfile1D: PortTypeHint.MultiProfile1D The vertical bores to create geo sections. InputMateiralTable: PortTypeHint.MaterialTable The materials information used for CAD drawing. OutputGeoSections: PortTypeHint.GeoSections The list of SectionForCadDraw objects. OutputGeoSections3D: PortTypeHint.GeoSections3D The list of Section3D objects.
Attributes:
- InputMultiProfile1D: PortReference[PortTypeHint.MultiProfile1D]
- InputMaterialTable: PortReference[PortTypeHint.MaterialTable]
- InputPolyLines: PortReference[PortTypeHint.TableData]
- InputTerrainLines: PortReference[PortTypeHint.TableData]
- OutputGeoSections: PortReference[PortTypeHint.GeoSections]
- OutputGeoSections3D: PortReference[PortTypeHint.GeoSections3D]
- class modules.geoDataProcess.AddBoreLogForGeoSections
Add bore log information to the geo sections for cad drawing.
Accepts geo sections from
ExportGeoSectionsByBores, which already populate section geometry fields on eachSectionBore(profile coordinate, layer depths, elevations, etc.). This module enriches those bores with bore-log details fromInputTables, using the same conversion logic asBoreLogDrawWriter.- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'AddBoreLogForGeoSections', auto_run: bool = True, geo_sections: PortTypeHint.GeoSections | None = None, tables: PortTypeHint.TableCollection | None = None, name_maps: dict[str, dict[str, str]] | None = None, sample_types_map: dict[str, int] | None = None) None
Initialize AddBoreLogForGeoSections object.
Parameters
- geo_sectionsPortTypeHint.GeoSections | None, default: None
The geo sections to enrich with bore-log information.
- tablesPortTypeHint.TableCollection | None, default: None
The table collection containing bore, layer, and test data. name_maps: dict[str, dict[str, str]] | None, default: None Mapping of table names and field names between gsc file and the input tables. The key is the field name in the gsc file; the value is the table name or table title and field name or field title in the input tables. Example:: { “table_names”: { “bore_table”: “actual_bore_table_name”, “layer_table”: “actual_layer_table_name”, … }, “field_names”: { “bore_table”: { “bore_num”: “actual_bore_num_field”, “x”: “actual_x_field”, … }, … } } sample_types_map: dict[str, int] | None, default: None Mapping from string sample type names to integer codes. For example: {“厚壁原状”: 0, “薄壁原状”: 0, “扰动样”: 1, “岩石样”: 2, “水样”: 3} Ports
- InputGeoSectionsPortTypeHint.GeoSections
Geo sections with partially filled section bores.
- InputTablesPortTypeHint.TableCollection
Tables used to populate bore-log fields.
- OutputGeoSectionsPortTypeHint.GeoSections
Geo sections with enriched bore-log information.
Attributes:
- InputGeoSections: PortReference[PortTypeHint.GeoSections]
- InputTables: PortReference[PortTypeHint.TableCollection]
- OutputGeoSections: PortReference[PortTypeHint.GeoSections]
- class modules.geoDataProcess.SortByLayerNumber
Sort the table by layer number.
- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'SortByLayerNumber', auto_run: bool = True, table: PortTypeHint.TableCollection | PortTypeHint.TableData | None = None, order: Literal[ascending, descending] = 'ascending', layer_table_name: str = 'layer_table', layer_number_column: str = 'layer_number') None
Initialize SortByLayerNumber object.
Parameters
- tablePortTypeHint.TableCollection | PortTypeHint.TableData | None, default: None
The tables or table data to sort by layer number. order: Literal[“ascending”, “descending”], default: “ascending” The order of the layer number. If “ascending”, the layer number will be sorted in ascending order. If “descending”, the layer number will be sorted in descending order.
- layer_table_namestr, default: “layer_table”
The name or title of the layer table.
- layer_number_columnstr, default: “layer_number”
The name or title of the layer number column.
Attributes:
- InputTable: PortReference[PortTypeHint.TableCollection | PortTypeHint.TableData]
- OutputTable: PortReference[PortTypeHint.TableCollection | PortTypeHint.TableData]
- class modules.geoDataProcess.SliceTerrain
Slice the terrain surface by the given slice lines.
- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'SliceTerrain', auto_run: bool = True, terrain_points: PortTypeHint.TableData | None = None, poly_lines: PortTypeHint.TableData | None = None, terrain_columns: list[str] | None = None, max_segment_length: float = 10.0) None
Initialize SliceTerrain object.
Parameters
- terrain_pointsPortTypeHint.TableData | None, default: None
The terrain points to slice.
- terrain_columnslist[str] | None, default: None
Optional x/y/z column identifiers for
InputTerrainPoints, in order. Each item is a column field name or title in the input table. When omitted, columns are auto-detected by matchingGeneralPropsfield names or titles (x_coordinate/X坐标, etc.).- max_segment_lengthfloat, default: 10.0
Maximum horizontal length of each slice-line segment after refinement. Longer segments are subdivided before elevation sampling so terrain curvature is captured. Set to
<= 0to disable refinement. Ports- InputTerrainPointsPortTypeHint.TableData
Terrain point table with x/y/z coordinate columns.
- InputPolyLinesPortTypeHint.TableData
Poly line vertices that define slice lines.
- OutputTerrainLinesPortTypeHint.TableData
3-D terrain polylines, one row per sampled point.
- Output2DTerrainLinesPortTypeHint.TableData
2-D terrain polylines expressed as chainage and elevation.
Attributes:
- InputTerrainPoints: PortReference[PortTypeHint.TableData]
- InputPolyLines: PortReference[PortTypeHint.TableData]
- OutputTerrainLines: PortReference[PortTypeHint.TableData]
- Output2DTerrainLines: PortReference[PortTypeHint.TableData]
- class modules.geoDataProcess.MapBoreTypeToKCAD
Map bore-type values to KCAD standard codes.
Accepts either a
TableCollectionor a singleTableData. For a collection, the target table defaults tobore_table; for a single table, only the bore type column (defaultbore_type) is required. Usebore_table_nameandbore_type_fieldwhen your table or column uses different identifiers; both accept internal names or human-readable titles.- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'MapBoreTypeToKCAD', auto_run: bool = True, tables: PortTypeHint.TableCollection | PortTypeHint.TableData | None = None, bore_table_name: str = 'bore_table', bore_type_field: str = 'bore_type', token: str | None = None, proj_id: str | None = None, host: str | None = None) None
Initialize MapBoreTypeToKCAD object.
Parameters
- tablesPortTypeHint.TableCollection | PortTypeHint.TableData | None, default: None
The tables or single table to map bore type to KCAD.
- bore_table_namestr, default: “bore_table”
Table name or title within a
TableCollectionthat holds bore types. Ignored when input isTableData.- bore_type_fieldstr, default: “bore_type”
Field name or field title of the column containing bore type values to map.
- tokenstr | None, default: None
The token of the user.
- proj_idstr | None, default: None
The id of the project. If
self.proj_idis not None, theproj_idin InputToken or pipeline’sgdim_proj_idwill be ignored.- hoststr | None, default: None
If None, default value will be used (from GDIM connector config). Ports
- InputTablesPortReference[PortTypeHint.TableCollection | PortTypeHint.TableData]
Collection with the configured bore table, or a single
TableData.- InputTokenPortReference[PortTypeHint.Token]
The token, project id, and host. If unconnected, values are taken from the pipeline when available.
- OutputTablesPortReference[PortTypeHint.TableCollection | PortTypeHint.TableData]
The tables with mapped bore type to KCAD.
Notes
If you want to drive ``proj_id`` from InputToken or the pipeline only, do not set ``proj_id`` in the constructor, since ``self.proj_id`` has the highest priority.
Attributes:
- InputTables: PortReference[PortTypeHint.TableCollection | PortTypeHint.TableData]
- InputToken: PortReference[PortTypeHint.Token]
- OutputTables: PortReference[PortTypeHint.TableCollection | PortTypeHint.TableData]
- class modules.geoDataProcess.AddLayerNumberByStdLayerTable
Add
layer_numberto thelayer_tableby thelayer_numberdata fromstandard_layer_table.This used when there is no
layer_numbercolumn in thelayer_table.- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'AddLayerNumberByStdLayerTable', auto_run: bool = True, tables: PortTypeHint.TableCollection | None = None, layer_table_name: str = 'layer_table', layer_number_name: str = 'layer_number', layer_number_title: str = '地层编号', token: str | None = None, proj_id: int | str | None = None, host: str | None = None) None
Initialize AddLayerNumberByStdLayerTable object.
Parameters
- tablesPortTypeHint.TableCollection | None, default: None
The tables to add
layer_numberto.- layer_table_namestr, default: “layer_table”
The name or title of the
layer_table.- layer_number_namestr, default: “layer_number”
The name of the
layer_numbercolumn.- layer_number_titlestr, default: “地层编号”
The title of the
layer_numbercolumn.- tokenstr | None, default: None
The token of the user. If None, the token will be get from the pipeline.
- proj_idint | str | None, default: None
The id of the project. If None, the project id will be get from the pipeline.
- hoststr | None, default: None
The host of the platform. Ports
- InputTablesPortReference[PortTypeHint.TableCollection]
The tables to add layer number to.
- InputTokenPortReference[PortTypeHint.Token]
The token to read the template structure.
- OutputTablesPortReference[PortTypeHint.TableCollection]
The tables with added layer number.
Notes
- The module will try to get the gdim template from the pipeline at first. - If the gdim template can be got from pipline, token is not required. - For the ``standard_layer_table``, it must be named as ``standard_layer_table`` in the input table collection. The layer number column must be named as ``layer_number`` in the ``standard_layer_table``. The ``standard_layer_table`` and ``layer_table`` must be provided in the input table collection. - If a column with the same name or title of the provided ``layer_number_name`` or ``layer_number_title`` is found in the layer table, the ``layer_number`` will not be added to the column.
Attributes:
- InputTables: PortReference[PortTypeHint.TableCollection]
- InputToken: PortReference[PortTypeHint.Token]
- OutputTables: PortReference[PortTypeHint.TableCollection]
- class modules.geoDataProcess.GeoSectionsUpdate
根据修改后的二维剖面地层线,重新生成封闭填充区域,并生成三维地质剖面对象。
- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'GeoSectionsUpdate', auto_run: bool = True, geo_sections: PortTypeHint.GeoSections | list[dict] | None = None) None
Initialize GeoSectionsUpdate object.
Parameters
- geo_sectionsPortTypeHint.GeoSections | list[dict] | None, default: None
待更新填充区域的地质剖面对象。 Ports
- OutputGeoSectionsPortTypeHint.GeoSections
更新填充区域后的二维地质剖面对象。
- OutputGeoSections3DPortTypeHint.GeoSections3D
更新填充区域后的三维地质剖面对象。
Attributes:
- OutputGeoSections: PortReference[PortTypeHint.GeoSections]
- OutputGeoSections3D: PortReference[PortTypeHint.GeoSections3D]