Index
subsurfaceio.site_investigation.io
Site investigation IO mixins (Excel, AGS, KML, DXF).
Classes:
| Name | Description |
|---|---|
AssignmentItem |
Map a 1-based file column to a registered field name. |
IOAGSMixin |
Mixin that reads and writes AGS 4 site-investigation files. |
IOCPeTITExcelMixin |
Mixin that loads CPT traces from a CPeT-IT Excel export. |
IODXFCrossSectionMixin |
Mixin adding cross-section DXF export to |
IODXFMapMixin |
Mixin that writes a DXF plan of in-situ test locations. |
IOExcelMixin |
Mixin that reads and writes site-investigation Excel workbooks. |
IOKMLMixin |
Mixin that writes a KML map of in-situ test locations. |
IONextGenerationLiquefactionAGSMixin |
Mixin that loads Next-Generation Liquefaction AGS/CSV files. |
InSituTestsLoadUserDefinedData |
Build a site investigation from user CSV/Excel column assignments. |
AssignmentItem
pydantic-model
IOAGSMixin
Mixin that reads and writes AGS 4 site-investigation files.
Methods:
| Name | Description |
|---|---|
from_ags |
Load a site investigation from an AGS 4 file. |
write_ags |
Write this site investigation as an AGS 4 file. |
from_ags
classmethod
Load a site investigation from an AGS 4 file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Any
|
AGS file path or file-like object. |
required |
Returns:
| Type | Description |
|---|---|
T
|
A new |
T
|
IOCPeTITExcelMixin
Mixin that loads CPT traces from a CPeT-IT Excel export.
Methods:
| Name | Description |
|---|---|
from_cpetit_excel |
Load CPT tests from a CPeT-IT Excel export. |
from_cpetit_excel
classmethod
Load CPT tests from a CPeT-IT Excel export.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Any
|
Workbook path or file-like object. |
required |
exported_as
|
Literal['normal', 'custom']
|
|
'normal'
|
Returns:
| Type | Description |
|---|---|
T
|
A new |
T
|
IODXFCrossSectionMixin
Mixin adding cross-section DXF export to SiteInvestigation.
Methods:
| Name | Description |
|---|---|
cross_section |
Build a |
write_cross_section_dxf |
Export a cross-section DXF for this site investigation. |
cross_section
cross_section(
stations: list[CrossSectionStation] | None = None,
*,
vertical: Literal["depth", "elevation"] = "elevation",
**kwargs: Any
) -> CrossSection
Build a
CrossSection from this
site investigation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stations
|
list[CrossSectionStation] | None
|
Optional
|
None
|
vertical
|
Literal['depth', 'elevation']
|
Vertical axis; |
'elevation'
|
**kwargs
|
Any
|
Forwarded to
|
{}
|
Returns:
| Type | Description |
|---|---|
CrossSection
|
An unplotted cross-section model. |
write_cross_section_dxf
write_cross_section_dxf(
path: str | Path,
*,
stations: list[CrossSectionStation] | None = None,
vertical: Literal["depth", "elevation"] = "elevation",
**kwargs: Any
) -> None
Export a cross-section DXF for this site investigation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Output DXF path. |
required |
stations
|
list[CrossSectionStation] | None
|
Optional
|
None
|
vertical
|
Literal['depth', 'elevation']
|
Vertical axis; |
'elevation'
|
**kwargs
|
Any
|
Forwarded to
|
{}
|
IODXFMapMixin
Mixin that writes a DXF plan of in-situ test locations.
Methods:
| Name | Description |
|---|---|
write_dxf_map |
Write a DXF plan of tests with easting and northing. |
IOExcelMixin
Mixin that reads and writes site-investigation Excel workbooks.
Methods:
| Name | Description |
|---|---|
from_excel |
Load project source data and analysis settings from Excel. |
write_excel |
Write this site investigation to an Excel workbook. |
from_excel
classmethod
Load project source data and analysis settings from Excel.
Restores raw/reported data and *_settings sheets only. Derived
calculation result sheets (interpretation/liquefaction/footing/pile
outputs) are ignored if present.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Any
|
Workbook path or file-like object. |
required |
project_id
|
str
|
Project id used to filter rows. |
required |
Returns:
| Type | Description |
|---|---|
T
|
A new |
T
|
write_excel
Write this site investigation to an Excel workbook.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Any
|
Output workbook path. |
required |
as_labels
|
bool
|
When true, write registered display labels as headers. |
True
|
include_calculations
|
bool
|
When true, also write calculation-result sheets. |
False
|
IOKMLMixin
Mixin that writes a KML map of in-situ test locations.
Methods:
| Name | Description |
|---|---|
write_kml_map |
Write a KML placemark map of tests with latitude and longitude. |
IONextGenerationLiquefactionAGSMixin
Mixin that loads Next-Generation Liquefaction AGS/CSV files.
Methods:
| Name | Description |
|---|---|
from_next_generation_liquefaction_ags |
Load a site investigation from an NGL AGS/CSV file. |
from_next_generation_liquefaction_ags
classmethod
Load a site investigation from an NGL AGS/CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Any
|
File path. |
required |
Returns:
| Type | Description |
|---|---|
T
|
A new |
T
|
InSituTestsLoadUserDefinedData
pydantic-model
Bases: Model
Build a site investigation from user CSV/Excel column assignments.
Fields:
-
delimiter(Literal[*list(keys()),]) -
first_line(int) -
import_all_sheets(bool) -
data_type(Literal['BORH', 'CPT', 'DMT', 'IST']) -
columns_assignments(list[AssignmentItem])
columns_assignments
pydantic-field
available_datasets
classmethod
Built-in column-assignment presets (BORH, CPT, DMT, IST).
handle_files
handle_files(
files: list[str | Path],
file_type: Literal["text", "excel"] = "text",
) -> SiteInvestigation
Read text or Excel files and return a SiteInvestigation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
files
|
list[str | Path]
|
Paths to CSV/text or Excel files. |
required |
file_type
|
Literal['text', 'excel']
|
|
'text'
|
Returns:
| Type | Description |
|---|---|
SiteInvestigation
|
A new |
SiteInvestigation
|
load_dataset
classmethod
Return a loader preset for dataset_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str
|
One of |
required |
Returns:
| Type | Description |
|---|---|
InSituTestsLoadUserDefinedData
|
A loader with default column assignments for that test type. |