Heterra

Heterra guide · Part 1

Getting started with Heterra

From your own data to figures and tables you can put in a paper, one method at a time.

Who it is for

Researchers and students who have spatial data and want to run a method on it without writing code.

What you need

Heterra 1.6.0 on a Mac or a Windows PC, and about 20 minutes for this part. Each method chapter takes 20 to 40 minutes.

What you get

For each method: what it answers, the steps in Heterra, how to read and report every result, and exercises.

How this guide works

The guide has five parts. This part introduces the software. Parts 2 to 5 are the four groups of methods; each method is one chapter, and every chapter has the same four sections:

SectionWhat you find there
1 The methodThe question the method answers, the idea behind it in plain words, and when to use it.
2 In HeterraHow to prepare your data, the example step by step with screenshots, and what changes with your own data.
3 Reading the resultsEvery figure and table: what it shows, how to read it, and a model sentence for a paper.
4 ExercisesShort tasks on the example and on your own data, with answers.

Every chapter uses the example that ships with Heterra, so you can repeat each step and compare your screen with the pictures. Several examples use simulated data: their numbers illustrate the tool and do not describe a real study.

Which method answers my question?

Your questionMethodChapter
Which factors explain the spatial pattern of my variable, and how do they interact?OPGD1
Where does each variable explain the response, and how strongly at each place?LISP2
Where does a variable break the smooth pattern of its surroundings?GC3
Do the values of covariates around a sample, not only at it, improve a prediction?SDA4
Do local anomalies of covariates around a sample improve a prediction?SDO5
Can spatial-pattern and neighbourhood features of covariates improve a prediction map?GCF6
What is the value at unsampled places, and how uncertain is it?GOS7
How much of the spatial structure of the data have my models absorbed?DSI8
How much of the spatial information in the data do my prediction models explain?SIE9

Install Heterra

Heterra is free. Download it from the home page.

No R or Python is needed.

Languages

The interface of Heterra is available in eight languages:

English简体中文 Simplified Chinese繁體中文 Traditional ChineseFrançais French
Español SpanishPortuguês Portuguese (Brazil)日本語 Japanese한국어 Korean

Heterra asks for the language in the welcome window of the first start. If you do not choose, it follows the language of your system, and uses English when the system's language is not one of the eight. To change it later, open Settings → Language, choose and confirm: Heterra restarts in the new language, so save your project first. This guide shows the English interface. Reports are always written in English.

Heterra's welcome window with one card per method
The welcome window. Each card loads a method's example, fills in the settings and checks the result against R.

The window

Heterra's main window with the OPGD tool open
The main window with a tool open: layers and Toolbox on the left, the map in the middle, the tool's panel on the right.
WhereWhat it is for
Toolbar, leftNew, open and save a project; Add Data; the map tools (pan, zoom, identify, select).
Toolbar, coloured buttonsThe nine methods, in the colours of their groups. The same tools are in the Toolbox.
Toolbar, rightThe five pages: Map, Layout, Table, Chart, Tools.
Layers / HistoryThe layers of the project. History lists every run, so earlier results can be opened again.
ToolboxThe methods in four groups, and the data tools.
Panel, rightWhat the page needs: a tool's steps, a layer's style, a chart's export buttons.

Add your data

Click Add Data, or drop files on the map. Heterra opens Shapefile, GeoPackage, GeoJSON, GeoTIFF, File Geodatabase (.gdb folder) and CSV with coordinate columns.

A table for the methods

Every method works on an attribute table: one row per location (a point, a polygon or a grid cell), one column per variable. Before you start, check three things:

Data tools

The Toolbox's Data tools prepare a layer without leaving Heterra:

ToolUse
CSV → pointsSaves a CSV with coordinate columns as a point layer.
ReprojectTransforms a vector layer to another coordinate system.
Raster → grid tableTurns rasters into a point layer of cell centres, one field per band: the grid that the prediction methods take.
JoinAdds the fields of a table to a layer where the key fields are equal.
Field calculatorComputes a new numeric field from an expression, for example a log transform.
ClipKeeps what lies inside an extent or inside the polygons of another layer.

Look at the data first

Select a layer to style it in the panel: single symbol, categories or graduated colours, with RColorBrewer palettes. The Table page shows the attribute table with a summary of every field (count, missing, mean, minimum and maximum), a quick way to find a column that was read as text or has missing values.

The Table page: the attribute table and a summary of each field
The Table page: the rows in the middle, a summary of every field on the right, and Export CSV.

Run a method

Every method is run the same way:

  1. Open the tool from the Toolbox or the toolbar. Its panel shows a short description and the reference to cite.
  2. Try the example first. Click Tutorial, then Load Example: the data are loaded and the settings filled in. Guide opens the example's own notes.
  3. Go through the steps. The panel is divided into numbered steps. Next moves on; Run appears only at the steps that compute. Settings that rarely change are under Advanced.
  4. Run. If a setting is still missing, a line beside the button says which one and at which step.
  5. Read the results. The main figure opens on the Chart page; the panel lists all outputs.

With your own data the steps are the same: add your layer, open the tool (without the tutorial) and choose your layer and fields in step 1.

Checked against RAfter an example runs, a green line in the panel says whether the results match the reference results computed with the method's R implementation. It is a check of the software on your computer; it appears for the examples only.

Find the results

The Chart page with the list of charts of a run and the export buttons
The Chart page after a run: the charts of the run and the export buttons in the panel on the right.

A run gives three kinds of results:

In a tool's panel, Outputs lists them all; entries that begin with "Figure" or "Table" open that figure or table. Under Results, the panel also writes a few sentences about the run in plain words; a click on a sentence opens the figure it speaks about.

Every run is kept in History (beside Layers), with its settings. Run a method twice with different settings and both results stay available.

Export for a paper

WhatWhereFormats
A figureChart page → ExportPDF and SVG (vector), PNG at 300 dpi, and Data CSV: the numbers behind the figure
A tableTable page → Export CSVCSV
A map or a page of maps and chartsLayout page → ExportPDF, SVG, PNG and TIFF at 300 or 600 dpi
A layer with its result fieldsRight-click the layer → Export LayerShapefile, GeoPackage, GeoJSON, CSV
A report of a runThe tool's panel → Export resultsDOCX, PDF, LaTeX
The Layout page with a map, its legend, scale bar and north arrow, and the export buttons
The Layout page: page size, template (one map, 1 × 2 or 2 × 2 panels), legend, scale bar, north arrow, and export.

Three points help when a figure goes into a manuscript:

Save the project (a .heterra folder) to keep the layers, runs and results together. An unsaved project lives in a temporary folder.

Report and cite

When you write up a result, give the reader what they need to repeat it:

In a paper

"The analysis was run in Heterra 1.6.0 (Song 2026), which implements the optimal parameters-based geographical detector (Song et al. 2020)."

Cite the software as: Song, Y. (2026) Heterra: Advanced spatial analysis [software]. https://heterra.org

Each tool's panel shows the full reference of its method with a Copy button, and each chapter of this guide ends with the references.

Exercises

Exercise 1Explore

Open the OPGD tutorial and click Load Example, but do not run it. On the Table page, find the field with the largest maximum. How many rows and fields does the layer have?

Answer

GDP has the largest maximum (16,589). The layer "Simulated cells" has 713 rows and 10 fields.

Exercise 2Export

Run the OPGD example. Export the feature figure as PDF and its Data CSV. Then open the Factor detector figure from the Outputs list and export it as PNG.

Checklist

You should have three files. Open the PDF and zoom in: the text stays sharp, because it is a vector file. The CSV holds one block of rows per panel of the figure.

Exercise 3Your data

Add one of your own layers. Check on the Table page that every variable you plan to use is numeric and note how many values are missing. Style the layer by your response variable with graduated colours.

Checklist

If a numeric column was read as text, correct the cell Heterra names and add the file again. If the layer has no coordinate system, give it one when adding it, or the map and the distance-based methods cannot place it.

Heterra guide, for version 1.6.0. © 2026 Yongze Song. Documentation and tutorial data: CC BY 4.0.