Survey Design
Question Types
geoshape

The geoshape question type captures a closed polygon — a series of GPS coordinates where the first and last point are the same. In rtSurvey's web form, this renders as a text input where the enumerator enters or pastes the coordinate string directly.

Basic XLSForm Specification

typenamelabel
geoshapefield_areaDraw the boundary of the field
geoshapezoneRecord the zone boundary

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;lat lon alt acc
ComponentDescription
latLatitude in decimal degrees
lonLongitude in decimal degrees
altAltitude in metres (0 if unknown)
accGPS accuracy in metres (0 if unknown)

The polygon must be closed — the last point must equal the first point.

Example — a four-point polygon (triangle, closed):

13.756331 100.501762 0 0;13.758000 100.503000 0 0;13.757000 100.506000 0 0;13.756331 100.501762 0 0

A minimum of three distinct points plus the closing repeat is required to form a valid polygon.


How it renders in rtSurvey

In the rtSurvey web form, geoshape renders as a plain text field. The enumerator types or pastes the coordinate string. There is no built-in interactive polygon map picker for this type in the current web form.

Collecting polygon points interactively

The recommended pattern for field collection is a repeat group of geopoint questions — each vertex uses the full GPS map picker — combined with a calculate to produce the geoshape string:

typenamelabelcalculation
begin repeatpolygon_pointsRecord each corner
geopointpointTap to record corner
end repeatpolygon_points
calculategeoshape_valuejoin(';', ${polygon_points/point})

After joining, append the first point manually to close the polygon, or use a second calculate to concatenate it.


Example usage

typenamelabelhintrequired
geoshapefarm_boundaryRecord the field boundaryEnter all corners separated by semicolons. First and last point must be the same.yes

Best Practices

  1. Use a repeat group of geopoint questions for interactive map-based collection and join the values — this gives enumerators a GPS picker for each vertex.
  2. Always close the polygon (repeat the first point at the end) before submitting.
  3. Include the expected format in the hint column when manual coordinate entry is required.
  4. Require at least 3 distinct corner points for a valid polygon — enforce this through instructions rather than XLSForm constraints.
  5. Use geopoint for single-location questions and geoshape only when area demarcation is the actual survey objective.

Limitations

  • There is no built-in interactive polygon map picker for geoshape in the rtSurvey web form.
  • The polygon must be manually closed — there is no automatic closing mechanism in the text input mode.
  • Validating polygon topology (e.g., non-self-intersection, minimum area) requires post-processing outside of XLSForm constraints.
  • Long boundaries with many vertices produce large text strings.