modules/s3dgraphy/s3dgraphy_integration.py¶
Overview¶
This file contains 23 documented elements.
Classes¶
S3DGraphyIntegration¶
Integrates S3DGraphy Extended Matrix with PyArchInit for advanced stratigraphic documentation and 3D visualization
Methods¶
init(self, db_manager)¶
Initializes an instance of the S3DGraphy Extended Matrix integration class, accepting an optional db_manager parameter that is stored as an instance attribute. Sets self.graph to None and initializes self.nodes as an empty dictionary, which serves as a cache for created nodes.
is_available(self)¶
Check if S3DGraphy is available
create_stratigraphic_graph(self, site_name)¶
Create a new stratigraphic graph for a site
Args: site_name: Name of the archaeological site
Returns: Graph object or None if S3DGraphy not available
add_virtual_reconstruction(self, vr_data)¶
Add a virtual reconstruction node to the graph These are hypothetical/reconstructed units for visualization
Args: vr_data: Dictionary with virtual reconstruction data
Returns: Node object or None
add_stratigraphic_unit(self, us_data)¶
Add a stratigraphic unit to the graph
Args: us_data: Dictionary with US data from PyArchInit
Returns: Node object or None
add_stratigraphic_relationship(self, us_from, us_to, relationship_type)¶
Add a stratigraphic relationship between two units
Args: us_from: Source US identifier us_to: Target US identifier relationship_type: Type of relationship (covers, cuts, fills, etc.)
Returns: True if successful, False otherwise
import_from_pyarchinit(self, site, area)¶
Import stratigraphic data from PyArchInit database
Args: site: Site name area: Optional area filter
Returns: True if successful, False otherwise
export_to_graphml(self, filepath)¶
Export the graph to GraphML format
Args: filepath: Path to save the GraphML file
Returns: True if successful, False otherwise
export_to_json(self, filepath)¶
Export the graph to JSON format
Args: filepath: Path to save the JSON file
Returns: True if successful, False otherwise
generate_harris_matrix(self)¶
Generate Harris Matrix from the stratigraphic graph
Returns: Dictionary representing the Harris Matrix or None
prepare_for_3d_visualization(self)¶
Prepare data for 3D visualization in Blender via EMtools
Returns: Dictionary with 3D visualization data or None
validate_stratigraphic_sequence(self)¶
Validate the stratigraphic sequence for logical consistency
Returns: List of validation warnings/errors
import_from_extended_matrix(self, filepath)¶
Import Extended Matrix data (JSON/GraphML) back to PyArchInit
Args: filepath: Path to Extended Matrix file
Returns: True if successful, False otherwise
calculate_chronological_sequence(self)¶
Calculate the chronological sequence of stratigraphic units using topological sorting of the directed graph
Returns: Dictionary with phases and chronological ordering
export_phased_matrix(self, filepath)¶
Export a phased/periodized matrix view
Args: filepath: Path to save the phased matrix
Returns: True if successful
PyArchInitS3DGraphyDialog¶
Dialog for S3DGraphy integration in PyArchInit
Methods¶
init(self, parent, db_manager)¶
Initializes a new instance of the S3DGraphy integration dialog for PyArchInit.
Stores references to the provided parent and db_manager objects as instance attributes, and creates an S3DGraphyIntegration instance using the supplied db_manager.
Parameters:
- parent — The parent object for this dialog.
- db_manager — The database manager instance passed to both the dialog and the underlying S3DGraphyIntegration.
export_to_extended_matrix(self, site, area, output_path)¶
Export site data to Extended Matrix format
QgsMessageLog¶
No description available.
A fallback stub implementation of the QGIS QgsMessageLog class, instantiated only when the qgis package is not available in the current environment. Provides a single static method, logMessage(msg, tag, level), which prints a formatted message to standard output in the form [tag] msg, replicating the signature of the native QGIS logging interface. The level parameter is accepted but has no effect in this dummy implementation.
Methods¶
logMessage(msg, tag, level)¶
Logs a message to standard output when the QGIS environment is not available. Accepts a message string msg, a tag string tag, and a severity level, formatting the output as [tag] msg via print. This static method serves as a fallback stub for QgsMessageLog.logMessage in non-QGIS contexts; the level parameter is accepted but not used in the output.
Qgis¶
No description available.
A minimal constants class that defines numeric severity level identifiers used for message logging. It exposes three class-level integer constants: Info (0), Warning (1), and Critical (2). These constants are intended for use with QgsMessageLog.logMessage to indicate the severity of a logged message.