01 The spatial editor
A GPU-accelerated map canvas that stays tied to your R objects.
Open it with the globe button in the toolbar. The map is MapLibre, so panning and zooming stay fluid over large vector data, and rasters are served as tiles by R itself rather than being flattened to a picture.
The important thing to understand: map layers are views onto R objects. A layer is not a copy of your data — it points at an object in your environment. Replace that object and the layer follows; delete it and the layer is invalidated.
Across the top of the panel is the ribbon. The Contents flyout holds your layer list. When you enter edit mode the ribbon is replaced by the geometry editing ribbon.
02 The map ribbon
03 Contents — the layer list
Your layers, topmost first. Empty, it reads No layers. Each row carries its own controls:
04 Basemaps
The Change basemap button opens the provider picker. Several providers work with no configuration; those requiring an access token read it from Settings → Basemaps.
The basemap is more than decoration — when you export a map to ggplot2 or tmap,
the chosen provider is carried into the generated code via maptiles, so
the exported figure has the same backdrop as the screen.
05 Vector symbology
Click a layer in Contents to open its symbology. What you can set depends on the geometry type, but the structure is the same throughout: pick a single style for the whole layer, or drive the style from a column.
Colour ramps
Continuous colouring uses a named scale. The built-in set:
06 Raster symbology
Raster layers get their own editor, opened the same way. Changes apply live — the tiles are re-rendered by R as you adjust, so you are looking at the real styling, not an approximation.
07 Labelling
Opened from the label button on a layer row. Grouped into sections:
08 Legend, north arrow and scale bar
The Map Settings menu on the ribbon toggles the Legend and North Arrow, each with a settings button for its own dialog.
These are not only screen decoration. Title, subtitle, caption, legend, north arrow, scale bar, graticules and panel border are all carried into exported map code, where they become real ggplot2 or tmap elements rather than being redrawn by hand.
09 Selection and identify
Selecting
Activate the selection tool on the ribbon and pick a mode:
A selection is more than a highlight — it becomes a scope. Toolbox tools offer Use only current view, which restricts the operation to the selected features and shows the slicing in the generated code.
Identify
Clicking a feature brings up its attributes in a popup. For newly drawn features, the attribute popup can be made to appear automatically — see Settings → Spatial Editor → Drawing → Attribute popup for new features.
Query by attribute
Selection is not limited to clicking. A selection query dialog builds an attribute expression to select by — the map equivalent of the toolbox’s condition builder.
10 Drawing and geometry editing
Digitizing built to CAD conventions — snapping, typed coordinates, true curves.
Enter Edit Mode swaps the ribbon for the geometry editing ribbon. Until you pick a feature it prompts Edit Mode — click a feature on the map.
Modes
Segment and shape tools
The Choose tool control picks what the next click lays down. Segment type switches between straight and curve construction.
| Tool | What it draws |
|---|---|
| Straight Line | An ordinary straight segment. |
| Arc Segment | A true circular arc through control points. |
| Endpoint Arc | An arc defined by its endpoints. |
| Tangent Curve | A curve continuing tangentially from the previous segment — the road-alignment case. |
| Bézier Curve | A Bézier through control points. |
| Circle | A complete circle. |
| Rectangle | An axis-aligned rectangle. |
| Freehand | Follows the cursor as you drag. |
| Trace | Follows the boundary of an existing feature — how you get coincident borders with no gaps or slivers. |
| Offset | A parallel copy at a set perpendicular distance in metres. Negative values offset the other way. |
| Add Point(s) | Point features — each click appends a row. |
| Distance & Bearing B | Type each course instead of clicking — see below. |
| Curve U | The same strip, starting on a curved course: tangent curve, curve, spiral, spiral–curve–spiral or free curve. |
CIRCULARSTRING and friends — not a polyline approximation.
That is what lets sfarc measure them exactly later.
Snapping
Toggle snapping turns it on and off; Snapping options opens the Snap to list. Snapping works across every visible layer and the shape you are currently drawing, backed by a spatial index so it stays instant over dense data.
Priority runs vertex > intersection > midpoint > edge, so the most meaningful target wins when several are in range.
Precise input — Distance & Bearing
An entry box in the ribbon takes typed coordinates instead of clicks, in the format
lng,lat · d100 a45:
# Absolute coordinate -122.42, 37.77 # Relative: 150 m at 45° clockwise from north, from the last vertex d150 a45
For a whole traverse there is a tool of its own. Distance & Bearing (B) opens a docked strip: say where you are measuring from, then enter each course in the notation your notes are already written in.
N45°30′E), deflection from the last course
(L/R) and angle right. An entry that can only mean one
thing is taken to mean it — N45°30′E typed while the
notation says Azimuth is read as a quadrant bearing rather than
refused.150ft and the unit comes with the number.1:N a surveyor judges it by. A curve contributes its
arc, never its chord.ourgeo_traverse() call naming the
origin, the courses and the CRS. The geometry ouRGeo writes records coordinates; the
distances and bearings they came from would otherwise be lost, and that call is what
keeps them.
Finishing and undoing
11 Exporting a map
The Export menu on the ribbon has three destinations.
Export to IMG
Renders the map to an image file. Choose Format, Size, Directory and File, then Export. The map is re-rendered at the size you ask for rather than screenshotted, so the output is publication resolution.
Export to ggplot / Export to Tmap
The interesting ones: instead of an image, you get the R code that draws your map.
ouRGeo reads your on-screen map — layers, symbology, labels, legend, north
arrow, scale bar, graticules, titles — and generates complete, standalone
ggplot2 or tmap code that reproduces it. Run it, edit it,
put it in a paper’s supplementary material, drop it into an R Markdown
document.
- Vector layers become the matching geoms with your fills, colours, widths and scales.
- Raster layers keep their on-map symbology —
geom_spatrasterwith a matchingscale_fill_gradientn(), orgeom_spatraster_rgb()for RGB composites;tm_rasterwith the equivalent tmap scale. - Basemaps are emitted via
maptiles. - Annotations — title, subtitle, caption, legend, north arrow, scale bar, graticules and panel border — are written as real elements, and can be overridden in the dialog before generating.