[general]
name=Sec Interp
qgisMinimumVersion=3.28
qgisMaximumVersion=4.99
description=Data extraction for geological interpretation
general_description=Supported languages: English, German, Spanish, Finnish, French, Hindi, Indonesian, Italian, Japanese, Dutch, Polish, Portuguese (Brazil), Russian, Chinese (Simplified)
version=3.12.1
author=Juan M Bernales
email=juanbernales@gmail.com
about=SecInterp is a QGIS plugin for geological cross-section construction and interpretation. Starting from a two-vertex section line, it samples DEM topography and projects geology polygons, structural measurements, and drillhole collars, surveys and intervals onto the section. The preview supports adaptive level of detail, snapping, distance/slope measurements, live symbology and a configurable legend. Interpretation polygons can inherit attributes from geology and drillholes, then be exported as 2D/3D geometries together with CSV, SHP, DXF, PDF, SVG and PNG outputs. It targets QGIS 3.28–4.x on Qt5/Qt6, requires no external Python packages, and is released under GPL-2.0-or-later. Source and documentation: https://github.com/geociencio/sec_interp and https://geociencio.github.io/sec_interp_docs/
tracker=https://github.com/geociencio/sec_interp/issues
repository=https://github.com/geociencio/sec_interp
hasProcessingProvider=False
changelog=
	3.12.1 (2026-11-01)
	* Signal Idempotency and Portal Polish:
	- Symbology: connect_signals() now removes its 15 internal changed links and the unit-reset button before reconnecting; repeated dialog cycles emit one refresh and one reset.
	- Icon and metadata: 128x128 PNG icon exported from the SVG master and expanded About text for portal reviewers.
	- Packaging: runtime dependencies are empty; qgis-manage/analyzer are development-only.
	- Quality: clean flake8 (F811/E402 fixed), 844 tests OK, QGIS 4 smoke test PASS.
	3.12.0 (2026-10-25)
	* Section Selection & Interpretation Settings:
	- Section Line: new "fid - label" selector that lists only 2-vertex lines, with a selectable label field; the chosen section feature is used by preview, export, LOD and async tasks.
	- Settings: Interpretation moved into a fifth tab (Interpretation Settings) with storage source, custom attributes and geology/drillhole attribute inheritance; existing projects keep working.
	- Core: QGIS-agnostic business core with injected translation/settings/map-settings ports; no QGIS imports in core/.
	- Maintainability: controller 465->295 lines, geometry 598->69, preview layer factory 535->202, 3D exporter 472->155, preview renderer 438->335; no module over 400 lines.
	- Documentation: User Guide refreshed with the new UI, Symbology and Interpretation figures.
	3.11.0 (2026-10-18)
	* Live Symbology & Legend Styling:
	- Settings > Symbology: a new tab styles the preview/export live (topography, structures, drillhole traces and interpretations); settings are stored in the project.
	- Per-unit editor: hide, recolor, rename and reorder geological and drillhole units; aliases and order are reflected in the preview and the exported legend.
	- Legend layout options: position (top/bottom x left/right), font size (6-16) and a maximum number of items ("+N more"). Symbology sections are collapsible and the dialog height is bounded to the screen.
	3.10.0 (2026-10-11)
	* Interactive Preview Legend:
	- Preview side panel: the legend moved off the canvas into a collapsible side panel beside the preview, with a list of drawn interpretations.
	- Per-unit legend controls: hide/show and recolor each geological unit; the choice applies to the preview and its exported image and is remembered.
	- Drillhole lithologies: drillhole interval units now appear in the preview and exported legends alongside geology.
	3.9.1 (2026-10-04)
	* Smoothed Profile:
	- Optional smoothed topography profile: a Smooth control with a distance window (10-500 m) overlays a soft line on the topographic profile and, on export, also writes topo_profile_smoothed.csv and profile_line_smoothed.<ext>.
	- Geology follows the smoothed profile when Smooth is active; structures and drillholes keep their raw sampling.
	3.9.0 (2026-09-27)
	* DEM/Section Insights, CRS Safety & Adaptive Vertical Exaggeration:
	- DEM / Section: Added CRS safety checks (warn on mixed CRS, block mislabelled CRS) and fixed a freeze when the DEM and section line use different CRS. Cross-CRS sampling now reprojects correctly for topography, geology, structures and drillhole collars.
	- DEM page: read-only band statistics (Min / Max / Mean / NoData) computed with a bounded sample so large or remote rasters do not block the UI.
	- Section Line page: profile-vs-DEM statistics (Min / Max / Mean and sample count) and a topographic profile color mode (gradient ramp or single color).
	- Adaptive Vertical Exaggeration: an Auto toggle (default on) computes VE from the profile aspect ratio and structural density (clamped 0.5x-20x), keeping the manual override.
	- Stability: closing the dialog no longer leaves temporary preview scratch layers in the project.
	3.8.0 (2026-09-19)
	* Core/GUI Decoupling & Reliability:
	- Architecture: Enforced the Extract-then-Compute pattern; business services migrated to a QGIS-agnostic core with a new gui/adapters layer (architecture allowlist 36 -> 6). No user-facing change.
	- Compatibility: Fixed a QGIS 4 crash by scoping QEvent.Type.Resize in the legend widget.
	- Export: 3D interpretation export is now enabled by default.
	- Tooling: CC <= 10 and i18n gates are now provided natively by qgis-plugin-analyzer 1.14.0.
	3.7.2 (2026-09-12)
	* QGIS 4 / Qt6 Compatibility:
	- Compatibility: Migrated 114 flat enum usages to scoped form (Qgis.Critical -> Qgis.MessageLevel.Critical, Qt.NoPen -> Qt.PenStyle.NoPen, etc.).
	- Compatibility: Resolved all Enum error findings reported by the QGIS plugin repository Qt6 checker.
	3.7.1 (2026-09-06)
	* Security Patch:
	- Security: Replaced a silent exception swallow (try/except/pass) in settings persistence with a logged warning.
	- Security: Wired the full Bandit security scan into the release pipeline to catch code smells before packaging.
	3.7.0 (2026-09-06)
	* i18n Quality Gate & UX Improvements:
	- i18n: Added AST-based translation hygiene gate (verify_i18n_hygiene.py) to enforce self.tr() wrapping.
	- i18n: Wrapped 9 untranslated dialog error titles (Export, Preview, Geology, Drillhole) in self.dialog.tr().
	- UI: Grouped preview action buttons, LOD controls, and layer checkboxes into a collapsible Controls section.
	- Packaging: Excluded AI/agent tooling directories from the distributable package.
	3.6.0 (2026-05-12)
	* Next-Gen Stability & QGIS 4 Ready:
	- Compatibility: 100%% compatibility with QGIS 4.x and Qt6 by resolving unhashable QgsTask issues.
	- Architecture: Eradicated legacy UI threading segmentation faults using robust asynchronous task anchoring and QTimer.
	- Rendering: Fixed race conditions during rapid preview regeneration through strict state locks and gracefully handled C++ object lifecycles.
	- DevOps: Modernized qgis-manage deployment tool with cross-version profile support and auto-discovery.
	- Quality: Maintained Cyclomatic Complexity <= 10 and 100%% test pass rate across 620 tests in Docker.
	3.5.0 (2026-04-28)
	* Operational Excellence & Autonomy:
	- Gen 6 Agentic Autonomy: Implemented self-pruning memory management and semantic skill injection for optimized development.
	- Quality Gate: Enforced project-wide CC <= 10 with automated pre-push audits.
	- Documentation: Achieved 100%% Google-style docstring coverage for the entire API.
	- Architecture: Optimized spatial indexing in critical UI paths and verified thread-safe core processing.
	3.4.0 (2026-03-29)
	* Integration & Translation Completeness:
	- i18n: Achieved 100%% translation coverage across all 13 supported languages.
	- i18n: Rewrote translation injection tool (apply_full.py) with ElementTree for robust XML parsing.
	- Testing: Added comprehensive Integration Tests for Vector Drivers (GPKG, SHP, DXF) and core parsing.
	- Core: Improved placeholder protection during automatic translation generation.
	3.3.0 (2026-03-14)
	* Extreme Stability & QGIS 4.x Readiness:
	- Stability: Resolved memory leaks and orphaned signal connections in SignalManager/main_dialog.
	- UI: Implemented cleanup_finalized in measurement tools to ensure canvas hygiene.
	- Core: Migrated to DTOs (DrillholeProjection) and increased Return Type Hint coverage to 44.5%%.
	- Rendering: Switched to Rule-Based Renderer for 3D exporters (100%% reliable styling).
	- Quality: Achieved 91%% GUI test coverage and 100%% API-agnostic compliance (qgis.PyQt).
	3.2.0 (2026-03-02)
	* QGIS 4.x Readiness & Structural Refinement:
	- Compatibility: 100%% compliance with API-agnostic principles (qgis.PyQt). Verified QgsTask background processing.
	- UI: Refactored PreviewLayerFactory to use shared geometry/exaggeration helpers (extracted _apply_exaggeration, _to_qgs_points).
	- GUI: Standardized DialogSettingsPersistence to reduce boilerplate in session management.
	- Testing: Re-enabled legacy skipped tests (4 tests) by updating geometry mocks to native API.
	- Testing: Added integration suite for 3D vertical projections in Cartesian systems.
	3.1.0 (2026-02-19)
	* Global i18n Expansion & Architecture Pipeline:
	- i18n & GUI: Mass automatic translation of missing strings in all 14 Supported languages. Added translatable validation messages.
	- Export: Added debug logging and i18n support to exporters. Added 'Reset to defaults' button for export options.
	- Core: Modularized ProjectValidator using Pipeline pattern. Decomposed StateManager.
	- Core: Eliminated circular imports in validation. Stabilized QCoreApplication imports for tests.
	3.0.1 (2026-02-17)
	* Quality & Stability Release:
	- Signals: Eliminated 22 signal leaks, achieving zero-leak status.
	- Quality: Achieved 70.0/100 maintainability score with project-wide formatting.
	- i18n: Expanded support to 14 languages (added Polish, Dutch, and Finnish).
	- Maintenance: Optimized plugin size by 80%% via .qgisignore.
	3.0.0 (2026-02-14)
	* Major Evolution - Global Reach & Core Stability:
	- i18n: Achieved 100%% core coverage for 8 languages (ES, FR, PT_BR, DE, RU, ZH_CN, ID, IT).
	- Automation: Integrated full i18n maintenance workflow into Makefile (`make transup`).
	- Architecture: Decomposed `DrillholeService` into specialized processors (`Collar`, `Survey`, `Interval`) using the Facade Pattern (ADR-0008).
	- Architecture: Implemented `AccessControlService` for secure management of restricted 3D features.
	- Domain Layer: Transitioned from monolithic `types.py` to a modular `core.domain` package (Entities, DTOs, Enums).
	- Performance: Enhanced asynchronous background tasks with safer UI decoupling.
	- Infrastructure: Automated translation engine (`apply_full.py`) with version-controlled master data.
	- Quality: Overhauled test infrastructure with robust QGIS API mocks (160+ mock methods).
	2.9.0 (2026-02-01)
	* Quality Sprint - Architecture Consolidation:
	- Core: Decoupled DrillholeService into specialized processors (SRP).
	- Core: Modularized 'core.types' and unified data flow across services.
	- Core: Replacing .clone() with robust constructors and centralized context setup.
	- Quality: 100%% test success with improved environment stabilization.
	2.8.0 (2026-01-25)
	* Debt Reduction & UI Improvements:
	- Core: Full Core-QGIS Architectural Decoupling using WKT/DTO pattern.
	- Core: Improved thread-safety for background tasks.
	- UI: Added legend visibility toggle with project/global persistence.
	- Infrastructure: Enhanced geometric mocks (azimuth support).
	- Documentation: Fixed API docs Sphinx build.

	2.7.0 (2026-01-18)
	* Operational Excellence & Documentation:
	- Infrastructure: Dockerized QA environment (100%% tests passing).
	- Documentation: Automated Sphinx docs & Clean HTML.
	- Architecture: 3-Level Robust Validation & Dialog Managers.
	- Features: Enhanced 3D Export (PolygonZ) & Sidebar UI.
	- i18n: Full English/Spanish support.

	2.6.0 (2026-01-09)
	* Infrastructure & DevOps:
	- CI/CD: Fully dockerized pipeline using official QGIS image.
	- Optimization: CC <= 5 in 3D Exporter.
	* Stability & Quality:
	- Resolved mock pollution in GUI tests.
	- Project-wide code formatting (black).
	- Added performance benchmarks.
	* Internationalization:
	- Translated Measure tool and default namings.
	* GUI & Validation:
	- Unified validation logic and UI completion checks.

	2.5.0 (2026-01-03)
	* Major Features:
	- 3D Interpretation Export: Export 2D interpretations as real 3D Shapefiles (PolygonZ).
	- Settings Page: New sidebar page to manage plugin configurations.
	* Improvements & Stability:
	- Overhauled Data Persistence: Robust restoration with multi-scope support and layer name fallback.
	- Proactive Auto-save: Parameters are remembered immediately on Preview or dialog Accept.
	- Quality Assurance: Project-wide Ruff activation and legacy validation fix.
	- Forced Disk Sync: Immediate configuration writing for increased reliability.
	- Fixed Geology Preview Rendering error.

	2.4.0 (2025-12-31)
	* Major Features:
	- Internationalization System: 5 languages (ES, FR, DE, RU, PT_BR) with auto-locale detection.
	- Interpretation Tool: Interactive feature digitizing on profile with smart snapping and auto-styling.
	* Architecture & Refactoring:
	- Complete Core Refactoring (Phases 1-6): DI, Exceptions, CacheManager, Async, Validation.
	- GUI Decomposition: Split main dialog into specialized managers.
	* Infrastructure:
	- Migrated to 'uv' for dependency management (uv.lock).
	- Centralized configuration in pyproject.toml.
	- Pre-commit hooks and Strict Linting (100%% QGIS Compliance).
	* Critical Fixes:
	- Stability improvements in Preview rendering and I18n loading.

	2.3.0 (2025-12-25)
	* Enhanced Multi-Point Measurement Tool:
	- Support for polyline tracing with unlimited measurement points
	- Dedicated "Finalize" button for explicit measurement completion
	- Comprehensive metrics: Total 3D distance, Horizontal distance, Elevation change, Average slope
	- Persistent visual feedback with green vertex markers and measurement lines
	- Auto-reset on new measurement for improved workflow
	* Structural Improvement Plan - Major Architectural Refactoring:
	- Phase 1 - Architectural Decoupling:
	* Extracted DialogToolManager for map tool encapsulation
	* Centralized preview logic in PreviewManager
	* Eliminated PyQt dependencies from core/validation (enum-based FieldType)
	- Phase 2 - Complexity Reduction:
	* Modularized geometry.py into extraction/processing/filtering sub-packages
	* Refactored DrillholeService with extracted private methods
	* Implemented adaptive LOD (Level of Detail) for topography
	- Phase 3 - Performance Optimization:
	* Robust cache with hash-based invalidation in PreviewManager
	* Spatial indexing (QgsSpatialIndex) for drillhole filtering
	* Improved rendering performance (84ms for 6km sections)
	- Phase 4 - Documentation:
	* Created ARCHITECTURE.md (unified technical documentation)
	* Created DEVELOPMENT_GUIDE.md (developer onboarding)
	* Improved docstring coverage to 75.9%%
	* Code Quality Improvements:
	- Quality score increased from 71.1 to 74.4 (+4.6%%)
	- Fixed all critical lint errors (imports, typing, complexity)
	- Removed deprecated typing imports (Dict/List → dict/list)
	- Improved error handling with logger.exception
	* Critical Bug Fixes:
	- Fixed ModuleNotFoundError for geometry_utils sub-package
	- Resolved NameError for Optional in profile_service.py
	- Fixed AttributeError in measure_tool (DialogToolManager access)
	- Corrected TypeError in create_buffer_geometry signature
	- Fixed UnboundLocalError in PreviewManager cache handling
	- Added CRS transformation support in spatial filtering
	- Implemented field validation for drillhole processing
	- Fixed geology disappearing on subsequent preview clicks (cache persistence)
	- Fixed drillholes not rendering (missing return statement in _generate_drillholes)
	- Added diagnostic logging for drillhole trace generation

	2.2.0 (2025-12-22)
	* Major Refactoring & Architecture:
	- Moved main SecInterp class to plugin root (sec_interp_plugin.py).
	- Modularized validation into core/validation/ package.
	- Fragmented SecInterpDialog into specialized managers.
	* Documentation & Optimization:
	- Translated 100%% of documentation (ARCHITECTURE.md) to English.
	- Optimized Help System (removed source code views/redundant raw sources).
	- Slimmed ZIP package by 70%% uncompressed through advanced exclusions.
	* Features & UX:
	- Restored visual workflow images to User Guide.
	- Fixed toolbar icon loading and Axis/Grid alignment.

	2.1.0 (2025-12-17)
	* Major Feature: Snap-Enabled Measurement Tool
	- Iterative vertex snapping using QgsPointLocator (Avoids project pollution)
	- Performance optimized with locator caching
	* AI Workflow & Reliability:
	- Unicode normalization (NFD) for robust keyword matching (accents support)
	- Direct integration of AI_CONTEXT and Project Brain in prompts
	* Fixes:
	- Resolved QgsSnappingConfig AttributeError (QgsTolerance.Pixels)
	- Eliminated scratch layer warnings

	2.0 (2025-12-14)
	* Major Feature: Drillhole Data Handling
	- 3D Projection of drillhole traces onto 2D profile sections
	- Auto-calculation of total depths and handling of vertical holes without survey
	- Visualization of geological intervals along drillhole traces
	* Drillhole Data Export:
	- Export drillhole traces to Shapefile (drillhole_traces.shp)
	- Export interval data with attributes to Shapefile (drillhole_intervals.shp)
	* Major UI Refactoring & Enhancements:
	- New specialized Drillhole Input Page
	- Enhanced Preview System with dedicated persistent rendering for all data types
	- Fixed critical rendering bugs (zoom persistence, async updates)
	* Architecture:
	- Implemented DrillholeService for encapsulated logic
	- Refactored ProfileController to orchestrate multiple data services
	- Unified export logic with extensible Exporter pattern

	1.1 (2025-12-12)
	* Performance & Optimization:
	- Implemented asynchronous parallel processing for geological generation
	- Integrated Performance Monitor (RAM & Execution Time tracking)
	- Added non-blocking UI during heavy calculations
	* Preview System Enhancements:
	- Implemented Adaptive Level of Detail (LOD) for high-performance rendering
	- Added Dynamic Zoom-based LOD (details increase as you zoom in)
	- Added Measurement Tool (Distance and Slope/Gradient)
	- Improved CRS handling and fixed blank rendering issues
	* Architecture & Fixes:
	- Refactored services to use Command Pattern for parallel execution
	- Fixed structure projection consistency
	- Resolved "No valid layers to render" warnings
	- Fixed Dip Scale Factor application


	1.0 (2025-12-08)
	* Refactoring & Architecture:
	- Split monolithic modules (algorithms.py, main_dialog.py) into focused components
	- Modularized exporters ecosystem
	- Implemented spatial indexing and native QGIS algorithms for performance
	* Quality Assurance:
	- Added comprehensive type hinting across modules
	- Enhanced test infrastructure with pytest and QGIS support
	- Implemented security fixes (path traversal protection)
	* Major UI Refactoring - Plugin Manager Style:
	- Redesigned main dialog with sidebar navigation (QListWidget + QStackedWidget)
	- Replaced absolute positioning with responsive layouts (QVBoxLayout, QHBoxLayout, QSplitter)
	- Integrated native QGIS theme icons for sidebar items
	- Improved preview/results area proportions with better vertical space management
	- Fixed legend rendering and resizing issues
	* Code Quality Improvements:
	- Extracted LegendWidget to separate module (gui/legend_widget.py)
	- Refactored preview_profile_handler with helper methods and early returns
	- Refactored export_preview with dedicated methods per format (PNG, JPG, SVG, PDF)
	- Applied SOLID principles throughout main dialog class
	* Documentation:
	- Added COMMIT_GUIDELINES.md for standardized commit messages
	- Added RELEASE_PROCESS.md with version release workflow
	- Added drilllogs_research.md with future integration requirements

	0.3 (2025-12-03)
	* Major Refactoring - Modular Project Structure:
	- Reorganized codebase into core/, gui/, resources/ packages
	- Improved code maintainability and scalability
	- Better separation of concerns (business logic, UI, resources)
	* Quality Improvements:
	- Achieved Pylint score 10/10
	- Specific exception handling throughout codebase
	- Comprehensive code documentation
	- Configured .pylintrc for consistent code quality
	* Testing & CI/CD:
	- Added pytest infrastructure with QGIS support
	- Created initial unit tests (3 tests passing)
	- Configured GitHub Actions for automated testing
	- Test configuration in tests/conftest.py
	* Build System:
	- Updated Makefile for new structure
	- Refactored deploy.sh for modular deployment
	- Organized build scripts in scripts/ directory
	* Documentation:
	- Added REFACTORING_PR.md with detailed changes
	- Improved project documentation structure
	- Added implementation plans for future features

	0.2 (2025-11-30)
	* Major UI Overhaul - Native QGIS Widget Integration:
	- Replaced standard Qt ComboBoxes with QgsMapLayerComboBox for automatic layer population
	- Integrated QgsRasterBandComboBox for intelligent raster band selection
	- Added QgsFileWidget for native file/directory browsing with QGIS integration
	- Eliminated manual layer population code - widgets auto-sync with QGIS project
	- Improved user experience with native QGIS look and feel
	* UI Enhancements:
	- Collapsible results panel (QgsCollapsibleGroupBox) for better space management
	- Read-only results field to prevent accidental edits
	- Fixed Qt enum syntax for better cross-version compatibility
	* New Features:
	- Flexible parsers for geological structural measurements (dip/strike formats)
	- Comprehensive logging system integrated with QGIS Message Panel
	- Enhanced validation logic for QgsMapLayer objects
	* Code Quality:
	- Removed 200+ lines of manual widget population code
	- Cleaner architecture leveraging QGIS native capabilities

	0.1 (Initial Release)
	- DEM topographic profile extraction
	- Geological outcrop data extraction
	- Structural point data extraction
	- Interactive preview visualization
tags=geology, mining, cross-section, borehole, drillhole, exploration, topography, profile, interpretation, dem, interpolation, digitizing, snapping, structural geology, subsurface, visualization
homepage=https://geociencio.github.io/sec_interp_docs/
icon=icon.png
experimental=False
deprecated=False
category=Vector
server=False
