Trace Map: Complete Digitizing Guide

Trace Map—also shown as Vector Crack Tracer—is FracSTAT’s workspace for digitizing fracture traces over a photograph or editing an existing SVG trace map. This guide follows the controls and behavior implemented in core/tracer.py, from opening source data to saving an analysis-ready SVG.

1. Recommended End-to-End Workflow

  1. Launch Trace Map from a FracSTAT Analyzer workspace.
  2. Open a reference photograph with Open Image, or load existing vectors with Import SVG.
  3. Improve image visibility, if needed, using Image Settings.
  4. Set the working extent with Canvas Size or Crop Tool.
  5. Create layers for the trace classes you need to keep separate.
  6. Set the trace colour and stroke width, then digitize all fracture paths with the Pen Tool.
  7. Inspect every trace at high zoom; select, erase, delete, undo, or redraw mistakes.
  8. Decide whether the reference image should be embedded in the SVG.
  9. Choose Save to FracSTAT when launched from FracSTAT, or Export SVG in standalone use.
  10. Close Trace Map and continue the analysis with the generated SVG.
Best practice: Establish a consistent interpretation rule before tracing—for example, whether to follow fracture centerlines, whether partly obscured traces are included, and where a trace ends. Apply the same rule throughout the image.

2. Open Trace Map and Source Data

Use the workspace header’s Trace Map control to launch the tracer. When FracSTAT supplies an output path, the tracer can write directly back to the application; its title includes the target SVG filename and the Save to FracSTAT action is available.

File actionUse
Open ImageLoads a raster reference image for digitizing. The image is placed on the reference-image layer behind the vectors.
Import SVGImports SVG paths as editable traces. When the SVG includes an embedded image, that image can also become the background.
Export SVGPrompts for a destination and writes the current vector workspace as an SVG.
Export BGExports the current background as PNG. If a crop has been applied, choose a straightened crop or the tilted appearance.
Save to FracSTATWrites to the output path supplied by FracSTAT so the application can load the map after the tracer closes.

If an existing FracSTAT trace map is reopened, Trace Map can restore its background and editable vectors from companion files. Imported paths are normalized into the current SVG/canvas coordinate space.

Input choice: Use Open Image to start a new interpretation. Use Import SVG to continue or revise vector work. Avoid tracing the same fractures twice when importing an SVG that already contains paths.

3. Workspace and Toolbar

The center canvas holds the background and vector traces. The top toolbar is divided into File, Edit, Draw, Options, and View controls; the right sidebar contains layers, metrics, and image settings.

ControlWhat it doesWhen to use it
Select ToolSelects one trace or drag-selects multiple traces.Reviewing, moving, or deleting existing vectors.
Pen ToolCreates a multi-node polyline, including a two-node straight trace.All fracture traces that must be included in the exported SVG.
Line ToolCreates a temporary two-point scale/reference line; an existing line body can be moved and its endpoints rotated.Measurement or alignment reference only. These lines are excluded from SVG and background exports.
Eraser ToolRemoves the part of a path under the circular eraser and splits surviving portions into paths.Local corrections without deleting a complete trace.
Hand ToolPans the view without modifying vectors.Navigation while zoomed in.
Crop ToolDisplays a movable/resizable crop area with a rotation angle and Apply/Cancel controls.Restricting the map to the study area or straightening a tilted image.
ColorChanges the active trace colour.Before drawing a class or set that should be visually distinct.
Image SettingsShows or hides the image-processing panel.Improving faint or unevenly illuminated source images.
Clear AllRemoves every trace on every layer after confirmation.Restarting vector interpretation; the operation can be undone immediately.
Delete ItemDeletes the currently selected/highlighted trace or traces.Removing complete incorrect paths.
Canvas SizeSets the canvas width and height numerically.Working to a known pixel extent or creating a blank vector canvas.

3.1 Drawing Options

OptionEffect
Stroke WidthSets the width used for newly drawn traces.
Include Image in SVGEmbeds/renders the background in the exported SVG. Leave it off for a vectors-only analysis map.
Allow Trace Outside ImageAllows points outside the scene boundary. When off, new points are clamped to the canvas edge.
Include Path NodesKeeps clicked vertices as a multi-node polyline. With it enabled, a one-point path is discarded when finished.

4. Draw Accurate Traces

4.1 Pen Tool for Polylines

  1. Select the destination layer in the layer tree.
  2. Set Color and Stroke Width.
  3. Activate Pen Tool or press D.
  4. Click the first visible endpoint of the fracture.
  5. Move along the fracture and click only where its direction changes. A preview segment follows the pointer.
  6. Press Enter to finish the trace, or Esc to cancel the unfinished path.
  7. Zoom in and verify that the vector follows the intended feature from endpoint to endpoint.

4.2 Line Tool for Temporary References

  1. Activate Line Tool or press L.
  2. Click the first endpoint and then the second endpoint; the line finishes automatically.
  3. To adjust it while the Line tool is active, drag the line body to move it or drag an endpoint to rotate/resize it around the opposite endpoint.
Do not use Line Tool for fracture data: Trace Map marks its output as a scale/reference line and hides it during SVG and background export. To digitize a straight fracture, use Pen Tool and click only the fracture’s two endpoints.

4.3 Snapping and Intersections

While drawing, Trace Map searches visible traces near the pointer. A new point can snap to an existing path, helping shared endpoints and intersections meet cleanly. Zoom in before placing junctions so the intended target is unambiguous.

Topology matters: For connectivity analysis, traces that meet should share the same junction position. Do not leave a tiny visual gap, and do not extend one trace through another unless the geological interpretation supports that relationship.

5. Select, Edit, Erase, and Undo

  • Select one: choose Select Tool (S) and click a trace.
  • Select several: drag a selection rectangle around the traces, or hold Ctrl while clicking to add/remove traces from the selection.
  • Select a layer: press Ctrl+A to select all traces on the active layer. In a text or numeric editor, the same shortcut selects the editor text instead.
  • Move selected traces: drag a selected trace with the Select tool; a multi-selection moves together.
  • Delete complete traces: press Delete or Backspace, or choose Delete Item.
  • Erase part of a trace: activate Eraser (E), then click or drag over the unwanted segment. Remaining portions become separate paths where necessary.
  • Undo/redo: use Ctrl+Z and Ctrl+Y, or the toolbar buttons.

The layer tree mirrors canvas traces. Selecting a trace child in the tree highlights it on the canvas. Selecting a layer heading makes that layer active for subsequent drawing.

6. Organize Layers and Monitor Metrics

The workspace begins with a protected reference-image layer and a drawing layer. Use Add Layer to create additional vector layers and Delete to remove an unwanted vector layer. The reference-image layer cannot be treated as a normal trace layer.

Layer-tree actionResult
Click a layer nameMakes it the active destination for new traces.
Check/uncheck a layerShows or hides that layer’s vectors; hidden traces are not snapping targets.
Click a trace childHighlights the corresponding path on the canvas.
Add LayerCreates another named vector layer.
DeleteDeletes the selected vector layer and its traces after the applicable checks.

The Trace Metrics card reports the active layer, total paths, and total nodes. Use it as a quick check that traces are being created on the intended layer and that a clear/erase operation did not remove more data than expected.

Layer strategy: Separate layers are useful for interpretation classes such as confirmed versus inferred traces or distinct fracture sets. FracSTAT’s downstream analysis ultimately depends on the SVG paths, so keep naming and inclusion rules documented with the project.

7. Prepare the Background Image

Image Settings modifies the displayed reference while preserving an original copy for comparison and reset. Adjustments can make subtle fractures easier to see but should not replace geological judgment.

AdjustmentPurpose
Brightness / ContrastCorrects an image that is too dark, bright, flat, or harsh.
GammaChanges midtone visibility without applying a simple linear brightness shift.
SharpnessEmphasizes local edges.
SaturationReduces or increases colour intensity.
GrayscaleRemoves colour to emphasize tonal structure.
Auto ContrastExpands image contrast automatically.
InvertReverses tones.
Hist. Equalize / CLAHEEnhances global or locally varying contrast.
RotationRotates the displayed source image.
Threshold controlsConvert tonal ranges to a binary-style view; Adaptive and Otsu provide automatic thresholding approaches.
Show Original / Show ProcessedSwitches between the unmodified reference and processed result.
Reset to DefaultsReturns processing controls to their shipped values.
Interpretation caution: Strong sharpening, equalization, or thresholding can create apparent edges that are not fractures. Toggle Show Original frequently and confirm every mapped feature against the source.

8. Crop, Rotate, and Set the Canvas

8.1 Crop Tool

  1. Activate Crop Tool or press C.
  2. Drag inside the crop area to move it.
  3. Drag an edge/corner handle to resize it.
  4. Enter a rotation angle in the floating crop card if straightening is required.
  5. Select Apply Crop to commit, or use the crop card’s Cancel button to leave crop mode without applying.

Applying a crop remaps the workspace to the cropped rectangle, updates the background, shifts vectors into the new origin, fits the view, and clears undo/redo history. Confirm the crop carefully before applying it.

8.2 Canvas Size

Choose Canvas Size, enter Width and Height, and accept the dialog. The scene boundary is updated and the workspace is fitted to the view. Unless Allow Trace Outside Image is enabled, drawing points are constrained to this boundary.

9. Save, Export, and Companion Files

OutputContents and behavior
Save to FracSTATWrites the SVG to FracSTAT’s supplied target path. Close the tracer afterward to return; FracSTAT loads the map automatically.
Export SVGCreates a user-selected SVG file. The background is included only when Include Image in SVG is checked.
Export BGCreates a PNG of the current background. For a rotated crop, choose straightened or as displayed.
<svg_base>_bg.pngSidecar background copy associated with a FracSTAT output path.
<svg_base>_traces.jsonEditable trace/layer sidecar used to restore the tracer workspace.

Temporary scale/reference lines are not rendered into the SVG output. If the tracer is closed with unsaved changes, it prompts to update the FracSTAT target or export the standalone work before closing.

Analysis-ready export: For a clean fracture network, leave Include Image in SVG unchecked. Keep the sidecar background separately for visual reference and reproducibility.

10. Keyboard and Mouse Key Map

10.1 Keyboard Shortcuts

KeyActionContext
SSelect ToolSelect, box-select, and move traces.
DPen / Draw ToolCreate exported fracture paths.
LLine ToolCreate or manipulate temporary scale/reference lines; they are not exported.
EEraser ToolErase path segments.
PHand / Pan ToolPan the canvas.
CCrop ToolOpen crop controls.
TTrace colourOpen the colour chooser.
IImage SettingsShow/hide the image-settings panel.
XDelete selectedRemoves highlighted complete paths.
+ / =Zoom inZooms around the viewport center.
- / _Zoom outZooms around the viewport center.
0Fit workspaceFits the complete scene in the view.
Arrow keysNudge viewScrolls the viewport in small steps.
Space (hold)Temporary panReturns to the previous tool when released.
Enter / ReturnFinish current traceCommits the active Pen path.
EscCancel current traceDiscards an unfinished Pen or Line path.
Delete / BackspaceDelete selected trace(s)Removes highlighted complete paths.
Ctrl+ASelect all tracesSelects every trace on the active layer.
Ctrl+ZUndoReverses the latest supported vector operation.
Ctrl+YRedoReapplies an undone operation.

Single-key tool shortcuts are ignored while typing in a text field or numeric spin box, preventing accidental tool changes.

10.2 Mouse Map

InputAction
Mouse wheelZooms in/out around the pointer position.
Left click with PenAdds a fracture-path node.
Left click with LinePlaces a temporary reference-line endpoint; drag an existing line body to move it or an endpoint to rotate it.
Left click with SelectSelects a trace; click empty space to clear selection.
Ctrl + left click with SelectAdds/removes a trace from a multi-selection.
Left drag on empty canvas with SelectDraws a selection rectangle.
Left drag on selected trace(s)Moves the selected vector paths.
Left click/drag with EraserErases portions of traces under the eraser.
Left drag with Hand or held SpacePans the view.
Crop-area dragMoves the crop; dragging handles resizes it.

11. Quality-Control Checklist

  • Trace the intended geological feature—not shadows, vegetation, labels, ruler edges, or enhancement artifacts.
  • Keep endpoint criteria consistent across the entire image.
  • Use enough Pen nodes to follow curvature, but avoid dense unnecessary nodes that add noise.
  • Inspect intersections at high zoom and ensure connected traces actually meet.
  • Check that traces do not unintentionally continue outside the canvas.
  • Confirm the active layer before each interpretation class.
  • Compare processed and original image views before accepting subtle traces.
  • Review Trace Metrics for unexpected path/node count changes.
  • Export a test SVG without the background and load it in the target Analyzer before extensive downstream work.
  • Preserve the original image and record crop, processing, interpretation, and scale decisions with the project.

12. Troubleshooting

ProblemCheck or solution
A new trace is not visibleConfirm the active layer is visible, the colour contrasts with the image, and stroke width is large enough at the current zoom.
The path stops at the canvas edgeEnable Allow Trace Outside Image only when tracing beyond the current boundary is intentional, or enlarge Canvas Size.
Shortcuts type into a field insteadClick the canvas first. Tool keys intentionally do not override active text or numeric editors.
Fractures do not connect downstreamZoom into junctions and redraw/snap endpoints so the vector geometry truly meets.
The exported SVG contains the photographTurn off Include Image in SVG and export/save again.
The background is missing after reopeningKeep the generated _bg.png beside the corresponding SVG and avoid renaming only one member of the set.
Editable layers are missing after reopeningKeep the generated _traces.json companion file beside its SVG.
Undo no longer reaches work before a cropApplying a crop clears undo/redo history by design. Save/export before major crop changes.
Image enhancement creates false edgesSwitch to Show Original, reduce processing, and map only features supported by the source image.
Closing warns about unsaved workChoose the save/update option. In FracSTAT mode this updates the supplied SVG; in standalone mode use Export SVG.