pycsamt.format.borehole.exports#

GeoJSON, VTP, and glTF exports for PCBH visualization subsets.

Functions

write_geojson(document, path, *[, ...])

Write WGS84 collar Points and trajectory LineStrings as GeoJSON.

write_gltf(document, path, *[, family, sides])

Write browser-ready glTF 2.0 (.gltf) or binary GLB tubes.

write_vtp(document, path, *[, family, sides])

Write interval tubes as ASCII VTK XML PolyData (.vtp).

Classes

ExportLoss(code, message)

One field or semantic category omitted from a view export.

PCBHExportReport(format, boreholes, ...)

Summary and explicit losses for a non-canonical export.

class pycsamt.format.borehole.exports.ExportLoss(code, message)[source]

Bases: PyCSAMTObject

One field or semantic category omitted from a view export.

Parameters:
code: str
message: str
class pycsamt.format.borehole.exports.PCBHExportReport(format, boreholes, features, source_crs, target_crs, losses)[source]

Bases: PyCSAMTObject

Summary and explicit losses for a non-canonical export.

Parameters:
  • format (str)

  • boreholes (int)

  • features (int)

  • source_crs (str)

  • target_crs (str | None)

  • losses (tuple[ExportLoss, ...])

format: str
boreholes: int
features: int
source_crs: str
target_crs: str | None
losses: tuple[ExportLoss, ...]
pycsamt.format.borehole.exports.write_geojson(document, path, *, target_crs='EPSG:4326', include_z=True)[source]

Write WGS84 collar Points and trajectory LineStrings as GeoJSON.

Parameters:
  • document (PCBHDocument)

  • path (str | Path)

  • target_crs (str)

  • include_z (bool)

Return type:

tuple[Path, PCBHExportReport]

pycsamt.format.borehole.exports.write_vtp(document, path, *, family='lithology', sides=8)[source]

Write interval tubes as ASCII VTK XML PolyData (.vtp).

Parameters:
  • document (PCBHDocument)

  • path (str | Path)

  • family (str)

  • sides (int)

Return type:

tuple[Path, PCBHExportReport]

pycsamt.format.borehole.exports.write_gltf(document, path, *, family='lithology', sides=8)[source]

Write browser-ready glTF 2.0 (.gltf) or binary GLB tubes.

Parameters:
  • document (PCBHDocument)

  • path (str | Path)

  • family (str)

  • sides (int)

Return type:

tuple[Path, PCBHExportReport]