qgis-profile-interpreter

qgis plugin for placing 3D points along elevation profiles
git clone git://src.adamsgaard.dk/qgis-profile-interpreter # fast
git clone https://src.adamsgaard.dk/qgis-profile-interpreter.git # slow
Log | Files | Refs | README | LICENSE Back to index

README.md (3051B)


      1 # Profile Interpreter
      2 
      3 A QGIS 3.40+ plugin for placing 3D interpretation points by clicking directly
      4 on the **Elevation Profile** view.
      5 
      6 It is data-agnostic: use it to digitize geological boundaries, borehole picks,
      7 geophysical layer tops, or any other interpretation on a profile/cross-section
      8 view — for example the profiles produced by the
      9 [TEM Loader](https://gitlab.com/qgeomodel/qgis-tem-loader) plugin.
     10 
     11 ## How it works
     12 
     13 When you click on the elevation profile, the plugin converts the click into a
     14 real-world 3D coordinate:
     15 
     16 ```
     17 click position (canvas pixels)
     18   -> QgsElevationProfileCanvas.canvasPointToPlotPoint()
     19   -> QgsProfilePoint(distance_along_section, elevation)
     20   -> interpolate X/Y along the profile curve at `distance`
     21   -> QgsPoint(x, y, z = elevation)  ->  PointZ feature
     22 ```
     23 
     24 The clicked vertical position becomes the feature's elevation (Z), and the
     25 horizontal position is mapped back to a true map X/Y along the cross-section
     26 line. If the **active layer** is an editable PointZ vector layer, clicked points land
     27 there (only the fields that already exist are written; the schema is never
     28 altered). Otherwise points are stored in a memory layer named
     29 **Profile interpretations** with `id`, `distance`, and `elevation` fields.
     30 
     31 ## Requirements
     32 
     33 - QGIS 3.40.0 or later (QGIS 4.x is also supported)
     34 - Python 3 (bundled with QGIS)
     35 
     36 ## Installation
     37 
     38 1. Build the zip: `make package`.
     39 2. In QGIS: **Plugins > Manage and Install Plugins > Install from ZIP**.
     40 3. Select `profile_interpreter.zip` and click **Install Plugin**.
     41 
     42 ## Usage
     43 
     44 1. Load data that supports elevation profiles (e.g. TEM Loader layers).
     45 2. Open the profile panel: **View > Elevation Profile**, then draw a profile
     46    line across your data so the section renders.
     47 3. Toggle **Interpret on Profile** (toolbar button or **Plugins > Profile
     48    Interpreter**) on.
     49 4. Click on the profile where you interpret a boundary. A PointZ feature is
     50    added to the active layer (if it is a writable PointZ layer) or to the
     51    fallback **Profile interpretations** memory layer. The point's X/Y/Z is
     52    printed to the Python console and shown in the message bar.
     53 5. Toggle the tool off to return to normal pan/zoom on the profile.
     54 
     55 # Limitations
     56 
     57 - When no active PointZ layer is set, interpretation points are stored in an
     58   in-memory fallback layer only; there is no GeoPackage persistence or
     59   per-boundary classification.
     60 - The plugin grabs the profile canvas by walking the Qt widget tree
     61   (`findChildren(QgsElevationProfileCanvas)`); there is no official PyQGIS
     62   accessor. With multiple profile docks open it picks the first visible one.
     63 - No editing/undo of placed points beyond standard layer editing.
     64 - No snapping configuration UI; snapping is left to the user's QGIS settings.
     65 
     66 ## Development
     67 
     68 ```sh
     69 make lint      # run flake8
     70 make test      # run unit tests (no QGIS required)
     71 make verify    # lint + test (what CI runs)
     72 make package   # build profile_interpreter.zip for installation
     73 make clean     # remove the zip
     74 ```
     75 
     76 ## License
     77 
     78 ISC: see [LICENSE](LICENSE).