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_interfaces: bool = True, precision_grid_size: float = 0.001, snap_tolerance: float = 0.001) 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_interfaces: bool, default: True Whether to merge the layer interface ines with same geo_id adjacent to each other. precision_grid_size: float, default: 0.001 Used for calculating closed areas, the grid size used for calculating closed areas. snap_tolerance: float, default: 0.001 Used for calculating closed areas, the snap tolerance used for calculating closed areas. 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. Use the output of
AddLayerNumberByStdLayerTablewhenlayer_tablehas nolayer_number. Wave logs are read fromsonic_logging_table; missingsampling_log_tableskips sampling.soil_bearing_capacity_fakfalls back tosoil_bearing_capacity_fa0. name_maps: dict[str, dict[str, str]] | None, default: None Optional override when input tables do not use GDIM reserved names. Defaults already look up reserved table/field names, same asBoreLogDrawWriter. Key is the reserved name; value is the actual table/field name or title.
Examples
{ "table_names": { "bore_table": "exploration_points", "layer_table": "strata", "spt_table": "spt_records", }, "field_names": { "bore_table": { "bore_number": "hole_id", "x_coordinate": "east", "y_coordinate": "north", "bore_top": "collar_elev", }, "layer_table": { "bore_number": "hole_id", "layer_bottom_depth": "bottom", "layer_number": "stratum", }, "spt_table": { "bore_number": "hole_id", "test_point_top_depth": "spt_top", "penetration_depth": "spt_len", "blow_count": "n_value", }, }, } sample_types_map: dict[str, int] | None, default: None Optional exact mapping from sample type name to integer code. When ``None``, names are coded by substring: 「原状」→ 0, 「扰动」→ 1, 「岩」→ 2, 「水」→ 3; anything else → -1. When set, listed names use the map; unlisted names still use the substring rule. Original names are stored in ``SamplingLog.sample_type_name``. Ports InputGeoSections: PortTypeHint.GeoSections Geo sections with partially filled section bores. InputTables: PortTypeHint.TableCollection Tables used to populate bore-log fields. OutputGeoSections: PortTypeHint.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.CompleteLayerTable
Complete layer location columns on
layer_table.Accepts a
TableCollectionthat contains a borehole table and a layer table.bore_table_nameandlayer_table_nameselect those tables by name or title. They default tobore_tableandlayer_table. The borehole table must providebore_numberandbore_top. The layer table must providebore_numberand the reference column named byreference_column(defaultlayer_bottom_depth).Missing location columns are added so the output
layer_tablecontainslayer_thickness,layer_bottom_depth,layer_top_elevation,layer_bottom_elevation, andlayer_top_depth. The reference column is the source of truth: the other four columns are recalculated from it, so a conflicting value such aslayer_thickness2 m againstlayer_bottom_depth5 m is replaced. A missing reference value, a blank borehole number in either table, a repeated borehole number in the borehole table, a layer borehole absent from the borehole table, or a missingbore_topraisesValueError. Depth and elevation use the borehole collar elevation (bore_top):layer_top_elevation = bore_top - layer_top_depthlayer_bottom_elevation = bore_top - layer_bottom_depthlayer_thickness = layer_bottom_depth - layer_top_depth
Layers of one borehole are contiguous. The current row order is top to bottom unless
order_by_referenceis true, in which case depth is ordered shallow to deep and elevation high to low before calculating. Thickness keeps the current row order. Results are written back to the original rows. The first layer’s top depth is 0.layer_top_depthandlayer_top_elevationare calculated outputs and cannot be the reference.- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'CompleteLayerTable', auto_run: bool = True, tables: PortTypeHint.TableCollection | None = None, bore_table_name: str = 'bore_table', layer_table_name: str = 'layer_table', reference_column: Literal[layer_thickness, layer_bottom_depth, layer_bottom_elevation] = 'layer_bottom_depth', order_by_reference: bool = False) None
Initialize CompleteLayerTable object.
Parameters
- tablesPortTypeHint.TableCollection | None, default: None
Collection containing the borehole table and the layer table.
- bore_table_namestr, default: “bore_table”
Name or title of the borehole table in the input collection.
- layer_table_namestr, default: “layer_table”
Name or title of the layer table in the input collection. reference_column: Literal[“layer_thickness”, “layer_bottom_depth”, “layer_bottom_elevation”], default: “layer_bottom_depth” Field name of the layer-location column used as the source of truth.
layer_top_depthandlayer_top_elevationcannot be selected. Every value must be finite.- order_by_referencebool, default: False
When true, order each borehole by
reference_columnfrom the top layer to the bottom layer before calculating. Bottom depth increases downward and bottom elevation decreases downward. Thickness keeps the current row order. Ports- InputTablesPortReference[PortTypeHint.TableCollection]
Collection containing the borehole table and the layer table.
- OutputTablesPortReference[PortTypeHint.TableCollection]
Collection whose layer table has every layer location column filled.
Attributes:
- InputTables: PortReference[PortTypeHint.TableCollection]
- OutputTables: PortReference[PortTypeHint.TableCollection]
- 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. Names that are not in the GDIM mapping are left unchanged.- 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]
- class modules.geoDataProcess.CalculateCorrectedBlowCount
按所选参考规范计算标准贯入表或动力触探表的修正击数。
- Inherits from:
PipeModule
Methods:
- __init__(mname: str = 'CalculateCorrectedBlowCount', auto_run: bool = True, table: PortTypeHint.TableData | None = None, reference_standard: str = REFERENCE_STANDARD_GB50021) None
Attributes:
- InputTable: PortReference[PortTypeHint.TableData]
- OutputTable: PortReference[PortTypeHint.TableData]