Skip to content

Commit 3537cd3

Browse files
committed
fix: add x/y to structure gdf
1 parent 4c1bf73 commit 3537cd3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

loopstructural/gui/map2loop_tools/thickness_calculator_widget.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
import os
44

55
from PyQt5.QtWidgets import QLabel, QMessageBox, QWidget
6-
from qgis.PyQt import uic
76
from qgis.core import QgsMapLayerProxyModel
8-
7+
from qgis.PyQt import uic
98

109
from loopstructural.toolbelt.preferences import PlgOptionsManager
1110

@@ -295,7 +294,6 @@ def _run_calculator(self):
295294
else:
296295
self.data_manager.logger(
297296
f"Warning: Unit '{u}' not found in stratigraphic column.",
298-
level=QLabel.Warning,
299297
)
300298
# Save debugging files if checkbox is checked
301299
if self.saveDebugCheckBox.isChecked():

loopstructural/main/m2l_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def calculate_thickness(
448448
else basal_contacts_gdf
449449
)
450450
sampled_contacts_gdf = qgsLayerToGeoDataFrame(sampled_contacts)
451-
structure_gdf = qgsLayerToDataFrame(structure)
451+
structure_gdf = qgsLayerToGeoDataFrame(structure)
452452

453453
# Log parameters via DebugManager if provided
454454
if debug_manager:
@@ -546,6 +546,8 @@ def calculate_thickness(
546546
except Exception as e:
547547
print("Failed to save sampler debug info")
548548
raise e
549+
structure_gdf['X'] = structure_gdf.geometry.x
550+
structure_gdf['Y'] = structure_gdf.geometry.y
549551

550552
thickness = calculator.compute(
551553
units,

0 commit comments

Comments
 (0)