qgis-tem-loader

qgis plugin for loading TEM geophysical inversion XYZ files as 3D objects
git clone git://src.adamsgaard.dk/qgis-tem-loader # fast
git clone https://src.adamsgaard.dk/qgis-tem-loader.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit b194b8ed8820243af06500b09f259a9491d7c297
parent 2943173c477390d02bd9154144aabc349de5dadf
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat, 23 May 2026 19:43:37 +0200

fix(styles): change resistivity color for values greater than 1600 ohm*m

Diffstat:
Mtem_loader/core.py | 9+++++----
Mtem_loader/metadata.txt | 1-
Mtem_loader/styles/layers.qml | 4++--
Mtest/test_core.py | 2+-
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tem_loader/core.py b/tem_loader/core.py @@ -98,19 +98,20 @@ RESISTIVITY_COLOR_RAMP = ( (400.0, '#a600a6'), (600.0, '#800080'), (1600.0, '#750075'), - (float('inf'), '#ffffff'), + (float('inf'), '#540054'), ) +UNKNOWN_RESISTIVITY_COLOR = '#ffffff' def resistivity_color(value): if value is None: - return RESISTIVITY_COLOR_RAMP[-1][1] + return UNKNOWN_RESISTIVITY_COLOR try: v = float(value) except (ValueError, TypeError): - return RESISTIVITY_COLOR_RAMP[-1][1] + return UNKNOWN_RESISTIVITY_COLOR if math.isnan(v): - return RESISTIVITY_COLOR_RAMP[-1][1] + return UNKNOWN_RESISTIVITY_COLOR for upper, color in RESISTIVITY_COLOR_RAMP: if v < upper: return color diff --git a/tem_loader/metadata.txt b/tem_loader/metadata.txt @@ -12,7 +12,6 @@ changelog= * Add optional DEM elevation adjustment using a selected project raster layer * Add import options for DEM adjustment and DOI masking controls * Add layer opacity output for DOI-aware layer styling - * Reorder import options so DOI masking controls appear before DEM controls 0.1.6 * Increase performance on large datasets by writing outputs to GeoPackage layers instead of CSV * Create spatial indexes for output layers to improve map and profile responsiveness diff --git a/tem_loader/styles/layers.qml b/tem_loader/styles/layers.qml @@ -1,6 +1,6 @@ <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> <qgis autoRefreshMode="Disabled" autoRefreshTime="0" hasScaleBasedVisibilityFlag="0" labelsEnabled="0" layerType="Vector" maxScale="0" minScale="100000000" readOnly="0" simplifyAlgorithm="0" simplifyDrawingHints="1" simplifyDrawingTol="1" simplifyLocal="1" simplifyMaxScale="1" styleCategories="AllStyleCategories" symbologyReferenceScale="-1" version="4.0.2-Norrköping"> - <renderer-3d layer="layers_12b54bb4_518f_47ff_a696_ce88ee7fec58" type="vector"> + <renderer-3d layer="layers_e3661a0f_ccf2_46c1_8ffe_3e248715c288" type="vector"> <vector-layer-3d-tiling max-chunk-features="1000" show-bounding-boxes="0" zoom-levels-count="3"/> <symbol material_type="simpleline" type="line"> <data alt-binding="centroid" alt-clamping="absolute" extrusion-height="0" offset="0" simple-lines="1" width="6"/> @@ -1121,7 +1121,7 @@ <Option name="dash_pattern_offset_unit" type="QString" value="MM"/> <Option name="draw_inside_polygon" type="QString" value="0"/> <Option name="joinstyle" type="QString" value="bevel"/> - <Option name="line_color" type="QString" value="255,255,255,255,rgb:1,1,1,1"/> + <Option name="line_color" type="QString" value="84,0,84,255,hsv:0.83333331346511841,1,0.33000686764717102,1"/> <Option name="line_style" type="QString" value="solid"/> <Option name="line_width" type="QString" value="4"/> <Option name="line_width_unit" type="QString" value="MM"/> diff --git a/test/test_core.py b/test/test_core.py @@ -289,7 +289,7 @@ class ProcessXYZTests(unittest.TestCase): self.assertEqual(resistivity_color(60), "#ffb500") self.assertEqual(resistivity_color(90), "#ff0000") self.assertEqual(resistivity_color(125), "#ff1c8d") - self.assertEqual(resistivity_color(2000), "#ffffff") + self.assertEqual(resistivity_color(2000), "#540054") self.assertEqual(resistivity_color(float("nan")), "#ffffff") self.assertEqual(resistivity_color(None), "#ffffff")