Orthogonal Measure QGIS Plugin v0.1

Author: Darko Nedic · Contact: office@geo-biz.com · License: GNU GPL v2+ · Min. QGIS: 3.0


Overview

Orthogonal Measure is a QGIS plugin that lets you define a local orthogonal coordinate system directly on the map canvas and then construct points by entering X and Y offsets in metres. It is designed for surveyors, civil engineers, and GIS professionals who need to quickly stake out or digitize points relative to a custom baseline — without leaving QGIS.

The plugin works correctly in any CRS (projected or geographic) because all offset calculations use ellipsoidal ground distances.

How It Works

1. Coordinate System Definition

  1. Point 1 — Origin (0, 0): Click anywhere on the map to place the origin of your local system.
  2. Point 2 — Y-axis direction: Click a second point. The direction from Point 1 to Point 2 defines the positive Y-axis.
  3. X-axis is automatically computed as perpendicular to the Y-axis, rotated 90° clockwise.

Both axes are visualized on the map canvas:

AxisColourPositive directionNegative direction
Y BlueSolid dashed lineFaint dotted line
X GreenSolid dashed lineFaint dotted line

2. Constructing Points

Once the axes are defined, the dockable panel (right side by default) becomes active:

  1. Enter the Y offset (metres along the Y-axis from origin).
  2. Enter the X offset (metres along the X-axis from origin).
  3. Click Construct Point (or press Enter).

The plugin places a red × marker at the computed map position and draws:

You can construct as many points as you need. Each point is added to the results table in the panel.

3. Exporting Points

Click Export to Layer to create a temporary memory layer named “Orthogonal Measure Points” containing all constructed points:

FieldTypeDescription
idIntegerSequential point number
x_offsetDoubleX offset in metres
y_offsetDoubleY offset in metres
map_eDoubleEasting in map CRS
map_nDoubleNorthing in map CRS

The layer uses the current project CRS and can be saved to any spatial format (Shapefile, GeoPackage, etc.) using standard QGIS tools.

User Interface

Toolbar & Menu

Dockable Panel

The panel can be:

SectionDescription
StatusInstructions and status messages; shows origin and Y-axis coords once defined.
Enter offset (m)Y and X spinboxes (range ±999 999 m, 3 decimal places, 0.1 m step).
Constructed PointsTable listing all constructed points with offsets and map coordinates.
ButtonsReset — clear everything. Export to Layer — export points.

Keyboard Shortcuts

KeyAction
EnterConstruct point (when a spinbox is focused)
EscapeReset the tool (clear axes and all points on the canvas)

Snapping

When the map tool is active, vertex + segment snapping is automatically enabled on all layers with a 20 px tolerance. This lets you precisely snap the origin or Y-axis point to existing features. The previous snapping configuration is restored when the tool is deactivated.

Visual Feedback

All visual elements are drawn directly on the map canvas and automatically reposition when you pan or zoom.

ElementAppearance
Origin marker Red double-triangle, 12 px
Y-axis point marker Blue triangle, 10 px
Y-axis (positive) Blue dashed, 2 px
Y-axis (negative) Blue dotted, 1 px, faded
X-axis (positive) Green dashed, 2 px
X-axis (negative) Green dotted, 1 px, faded
Constructed point Red ×, 12 px
Y projection line Blue dashed, origin → projection
X projection line Green dashed, projection → point
Right-angle indicatorWhite □, 6 px at the corner
Offset labelCompact text, white background, thin border

Typical Workflow

 1.  Open your project in QGIS (any CRS).
 2.  Click the Orthogonal Measure toolbar icon.
 3.  Click on a known point on the map → origin is set (red marker).
 4.  Click a second point that defines the Y-direction (blue marker).
     → Axes appear on the canvas; the panel becomes active.
 5.  Enter Y = 10.000, X = 0.000 → click Construct Point.
     → A point is placed 10 m along the Y-axis.
 6.  Enter Y = 5.000, X = -3.500 → click Construct Point.
     → A point is placed 5 m along Y and 3.5 m to the left of Y.
 7.  Repeat for all needed points.
 8.  Click Export to Layer → memory layer is added to the project.
 9.  Right-click the layer → Export → Save As… to save permanently.
10.  Close the panel or press Reset to start a new measurement.

Technical Details

Installation

From ZIP

  1. Download the plugin ZIP archive.
  2. In QGIS, go to Plugins → Manage and Install Plugins → Install from ZIP.
  3. Select the ZIP file and click Install.

Manual

  1. Copy the orthogonal_measure folder to your QGIS plugins directory:
  2. Restart QGIS (or reload plugins).
  3. Enable Orthogonal Measure in Plugins → Manage and Install Plugins.

File Structure

orthogonal_measure/
├── __init__.py                        # Plugin entry point (classFactory)
├── orthogonal_measure.py              # Main plugin class (OrthogonalMeasure)
├── ortho_map_tool.py                  # Map tool + canvas items
├── orthogonal_measure_dialog.py       # Dockable panel (QDockWidget)
├── orthogonal_measure_dialog_base.ui  # Qt Designer UI form
├── resources.py                       # Compiled Qt resources (icon)
├── resources.qrc                      # Qt resource definition
├── metadata.txt                       # QGIS plugin metadata
├── icon.png                           # Plugin icon
├── README.md                          # Markdown documentation
├── README.html                        # This file
└── i18n/                              # Translations

Known Limitations