The geotrace question type captures a sequence of geographic coordinates forming a line or path (polyline). In rtSurvey's web form, this renders as a text input where the enumerator enters or pastes the coordinate string directly.
Basic XLSForm Specification
| type | name | label |
|---|---|---|
| geotrace | river_path | Trace the path of the river |
| geotrace | road_route | Record the road route |
For the standard specification see the XLSForm documentation (opens in a new tab).
Data Format
Stored as a semicolon-separated list of points with no spaces around the semicolons. Each point is four space-separated values:
lat lon alt acc;lat lon alt acc;lat lon alt acc| Component | Description |
|---|---|
lat | Latitude in decimal degrees |
lon | Longitude in decimal degrees |
alt | Altitude in metres (0 if unknown) |
acc | GPS accuracy in metres (0 if unknown) |
Example — a three-point path:
13.756331 100.501762 15 8;13.758000 100.503000 14 6;13.760000 100.505000 13 5A minimum of two points is required to form a valid path.
How it renders in rtSurvey
In the rtSurvey web form, geotrace renders as a plain text field. The enumerator types or pastes the coordinate string. There is no built-in interactive map picker for this type in the current web form.
Collecting points interactively
The recommended pattern for field collection is a repeat group of geopoint questions — each point uses the full GPS map picker — combined with a calculate to produce the geotrace string:
| type | name | label | calculation |
|---|---|---|---|
| begin repeat | path_points | Record each waypoint | |
| geopoint | point | Tap to record point | |
| end repeat | path_points | ||
| calculate | geotrace_value | join(';', ${path_points/point}) |
The calculated string can then be stored in a text question or used in geotrace.
Example usage
| type | name | label | hint | required |
|---|---|---|---|---|
| geotrace | farm_boundary_path | Record the access path to the farm | Enter each waypoint separated by semicolons | yes |
Best Practices
- Use a repeat group of
geopointquestions for interactive map-based collection, then join the values — this gives enumerators a GPS picker for each individual point. - Include the expected format in the
hintcolumn when manual coordinate entry is required. - Validate presence with
required = yeswhen the path is mandatory. - Plan for data cleaning — paths entered manually may have inconsistent precision.
Limitations
- There is no built-in interactive map picker for
geotracein the rtSurvey web form. - The coordinate string can be long for complex paths — keep this in mind for form performance and storage.
- Validating path topology (e.g., minimum point count, self-intersection) requires post-processing outside of XLSForm constraints.