> For the complete documentation index, see [llms.txt](https://codifi-fdm.gitbook.io/codifi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codifi-fdm.gitbook.io/codifi-docs/web-app/draw-mode-and-geotools.md).

# Draw Mode & GeoTools

Draw Mode on the web is where you create and reshape Record geometry with a cursor and keyboard. It covers the same ground as [Draw Mode on mobile](/codifi-docs/mobile-app/mapping-locations/draw-mode-and-editing.md), with a set of tools that only make sense at a desk: tracing along existing features, lasso-selecting vertices, generating a shape from other Records, and stepping back through a Record's shape history.

{% hint style="info" %}
**Two rules worth learning first.** Every tool has a single-key shortcut, so you rarely need to travel to the toolbar. And nothing you do in Draw Mode is saved until you press **Finish**, so you can experiment freely.
{% endhint %}

***

### Entering Draw Mode

Select a point, line, or polygon Record, then start editing from whichever place you happen to be:

* **Create a new Record** with a location field, and Draw Mode opens on its own.
* **The Record card** on the map, using **Edit Shape**.
* **Record details**, using **Edit Shape**.
* **The Records list**, using **Edit Shape** on the row.

All four land in the same place.

> **Screenshot placeholder:** *A Record card open on the web map with the Edit Shape button visible.*

***

### The Draw Mode interface

Draw Mode splits into two bands, and it helps to know which one does what.

* **The toolbar, above the map,** holds every drawing and transform tool.
* **Cancel and Finish, below the map,** are the only two ways out. **Finish** commits your geometry. **Cancel** discards everything since you entered.

> **Screenshot placeholder:** *Draw Mode active on a line Record, with the full toolbar across the top and the Cancel and Finish buttons below the map.*

***

### The tools

| Tool            | Key                               | What it does                                                       |
| --------------- | --------------------------------- | ------------------------------------------------------------------ |
| **Cursor**      | `V`                               | Select a shape, move vertices, and choose where to insert new ones |
| **Draw**        | `D`                               | Click to place additional vertices                                 |
| **GeoTools**    | `G`                               | Geospatial transforms: smooth, simplify, and shape generation      |
| **Hand**        | —                                 | Pan the map without editing the shape                              |
| **Magnet**      | —                                 | Snap to existing geometry                                          |
| **Freehand**    | —                                 | Click and drag to draw a continuous run of points                  |
| **Trace**       | —                                 | Follow an existing feature, dropping points as you go              |
| **Flip**        | `F`                               | Reverse the direction vertices are added (lines only)              |
| **Undo / Redo** | `Cmd/Ctrl+Z` / `Shift+Cmd/Ctrl+Z` | Step backwards and forwards through your edits                     |

***

### Cursor and Draw

The **Cursor** tool (`V`) is your selection tool. Use it to pick a shape, drag individual vertices to new positions, and choose the point in an array where new vertices should be injected.

The **Draw** tool (`D`) places vertices. Click along the map and each click extends the shape.

### Panning without editing

The **Hand** tool pans the map without touching your geometry.

You rarely need to select it, though, because **holding the spacebar** temporarily switches to panning from whichever tool you are using. Let go and you are back in the tool you had active. This matters most in the middle of a long trace, where reaching for the toolbar would break your rhythm.

***

### Magnet snapping

Toggle the **magnet** on and your cursor pulls onto geometry that is already on the map, so a shared boundary lands exactly on its neighbor instead of almost.

**What it snaps to:**

* **Codifi Records** already in the Project.
* **Contextual map vector overlays** loaded into the Project.
* **Basemap vector data**, on whichever vector basemap you have selected.

> **Screenshot placeholder:** *The magnet toggled on in the toolbar, with the cursor locked onto the edge of an existing feature.*

***

### Freehand

The **Freehand** tool draws a dense run of points in one gesture. Click, hold, and drag, and points are dropped continuously along the path your cursor takes.

### Trace

**Trace** follows an existing feature for you, and it is the fastest way to match a boundary you already have on the map.

The magnet is switched on automatically when you pick up the tool, and the instruction bar reads **Trace ready, click a feature to start** until you snap to something.

{% stepper %}
{% step %}
**Snap to the feature.** Move the cursor onto the line or boundary you want to follow.
{% endstep %}

{% step %}
**Click once to start.** Points begin dropping as you move along the feature.
{% endstep %}

{% step %}
**Follow the feature.** Trace stays locked to the geometry as your cursor travels.
{% endstep %}

{% step %}
**Click once to pause** when you have traced far enough.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
**Fewer vertices on complex shapes.** Hold the spacebar while tracing, move your cursor further along the feature, then let go. Trace bridges the gap with far fewer vertices while still following the feature closely. On a detailed boundary this is the difference between a shape with a few dozen points and one with several hundred.
{% endhint %}

From a paused trace you can switch to another tool and keep transforming, or press **Finish** to commit.

> **Screenshot placeholder:** *The Trace tool active with the "Trace ready, click a feature to start" instruction visible at the bottom of the map.*

> **Screenshot placeholder:** *Screen recording showing a trace in progress along a stream line, points dropping as the cursor follows the feature.*

***

### Undo and Redo

Every edit is tracked, and there are two ways to step back:

* **Undo** — the back button in the toolbar, or `Cmd/Ctrl+Z`. Hold the shortcut to run backwards through many vertices at once.
* **Redo** — the forward button, or `Shift+Cmd/Ctrl+Z`.

This is worth reaching for mid-trace. A single mis-drop does not mean starting the shape over.

### Flip

**Flip** (`F`) reverses the direction in which vertices are added to a line's array. It applies to lines only.

Use it when you are extending an existing line and realize you need to build from the other end.

### Clearing a shape

The **delete** button clears the current shape completely, leaving the Record in place with no geometry.

***

### Working with polygons

Polygons support everything above, plus three things lines do not.

**Move the whole shape.** With the **Cursor** tool active, click inside the polygon and drag. The entire shape moves together rather than a single vertex.

**Lasso-select vertices.** With the **Cursor** tool active, click *outside* the shape and drag to draw a selection lasso. Selected vertices pick up a black stroke, and from there you can drag them as a group, or press `Delete` to remove them all from the array.

**Rectangle and circle.** Both replace the current geometry rather than adding to it, so if the Record already has a shape you are asked whether to replace it or go back. Choose replace, then click, drag, and click again to form the rectangle. You are returned to Draw Mode afterwards, where you can keep adding vertices or press `V` to go back to selecting.

> **Screenshot placeholder:** *A polygon in Draw Mode with several vertices lasso-selected, showing the black stroke on the selected points.*

> **Screenshot placeholder:** *The confirmation prompt asking whether to replace the current shape when the rectangle tool is selected.*

{% hint style="warning" %}
**Tracing a polygon against a vector basemap.** Trace can only snap to vector geometry, so switch to a vector basemap before tracing a boundary from the map itself. Finish a polygon trace with a double-click, or click once to stop dropping points and then press **Finish**.
{% endhint %}

***

### Single points

Editing a single point is the simplest case. Turn on the **magnet**, move along a line or onto a vertex to preview the coordinates you are about to write, and click to plot the new position.

Shape history works here too, so a point moved by mistake is recoverable.

***

### The Location tab

With a Record selected and open, the **Location** tab holds everything about its geometry.

* **Zoom to** brings the map back to the feature, which saves hunting after you have panned away.
* **The coordinate table** lists every vertex in the shape's array.
* **Additional columns** can be added to that table. These are worth turning on when vertices were captured with an external receiver, because the NMEA and GNSS detail recorded at capture time is retained per point.

> **Screenshot placeholder:** *The Location tab showing the coordinate table for a line, with the Zoom To control visible.*

***

### Shape history

**Shape history** is new on the web, and it is the answer to "this shape was right yesterday."

Open it from the Location tab and you get every committed version of the Record's geometry: each array of coordinates that has formed the line or polygon, or each set of coordinates for a point, with **who** created it and **when**.

Two controls sit on each revision:

* **Ghost** previews that version on the map, drawn over the current shape so you can compare before deciding.
* **Recall** brings that version back as the active geometry.

{% hint style="info" %}
**Recall does not roll back.** It writes a new update event rather than erasing history, and the list marks which revision is now current. Nothing is lost, and you can always tell which two versions match.
{% endhint %}

> **Screenshot placeholder:** *The Shape History panel listing several revisions with creator and timestamp, and the Ghost and Recall controls on one entry.*

***

### GeoTools

**GeoTools** (`G`) holds the geospatial transforms. They share one workflow:

{% hint style="warning" %}
**Apply is not save.** **Apply** sets a temporary transform so you can look at the result. The geometry is only written when you press **Finish** below the map. Leaving Draw Mode without pressing Finish discards it.
{% endhint %}

#### Smooth and Simplify

* **Smooth** adds vertices, rounding a shape out.
* **Simplify** reduces vertices, which makes the stored shape considerably smaller.

Simplify is the one to reach for after a long freehand or trace run, where the shape is far denser than the accuracy of the data warrants.

#### Outline from Records

Generates a shape that encloses other Records, which is how you draw a site boundary around the finds that define it.

{% stepper %}
{% step %}
**Select a parent Record** and open GeoTools.
{% endstep %}

{% step %}
**Choose Create outline from Records.**
{% endstep %}

{% step %}
**Pick which Records to enclose.** **Include children** takes the Record's direct children. **All descendants** takes the whole tree beneath it.
{% endstep %}

{% step %}
**Set a buffer** in meters, so the outline stands off the outermost Records rather than clipping them.
{% endstep %}

{% step %}
**Choose a polygon type and press Generate.**
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Some shapes cannot be drawn.** A concave polygon needs more than three points to exist, so asking for one around three Records produces a warning rather than a malformed shape. Codifi tells you when a requested shape is impossible instead of writing something wrong.
{% endhint %}

> **Screenshot placeholder:** *The Create Outline From Records panel showing the include-children option, the buffer field, and the polygon type selector.*

> **Screenshot placeholder:** *A generated convex polygon enclosing three positive shovel test pits with a buffer standing off from them.*

#### Sketch Corridor

Draws a corridor of a set width along a path, which is how you turn a transect line into a survey coverage polygon.

Set the buffer width, press **Sketch Corridor**, then plot vertices along the feature you are following. The magnet helps here: snap to the transect and the corridor follows it exactly. Finish with a double-click, or press **Apply** in GeoTools.

{% hint style="warning" %}
**Sketch Corridor replaces the current shape.** If the Record already has geometry, it is swapped for the corridor.
{% endhint %}

> **Screenshot placeholder:** *Screen recording showing a corridor being sketched along a transect line with the magnet snapped to it, then the finished coverage polygon on the Record.*

***

### Related

* [Draw Mode & Editing on mobile](/codifi-docs/mobile-app/mapping-locations/draw-mode-and-editing.md) — the touch equivalent, for work in the field
* [The Project Workspace](/codifi-docs/web-app/the-project-workspace.md) — the map, list, and split views this sits inside
* [Map Overlays](/codifi-docs/web-app/map-setup-and-offline-areas/map-overlays.md) — loading the contextual layers the magnet and Trace snap to
* [GIS Exports](/codifi-docs/web-app/gis-exports.md) — getting the geometry back out
