Add a constraint based on distance to selected location

This XLSForm was developed to ensure enumerators are in the correct location when collecting data, based on a set of predefined locations and GPS coordinates for each enumerator.

With this XLSForm set up, you can:

  1. Select an enumerator
  2. Select a point on a map from a list of locations assigned to the enumerator
  3. Pull the selected GPS coordinates from an external CSV
  4. Record the current location of the enumerator
  5. Add a constraint to ensure the enumerator is within a certain perimeter of the selected location (here, 100 meters), using the distance() function

Note: the select from map function only works in KoboCollect. In Enketo, this question appears as a normal select_one question.

distance_constraint.xlsx (10.8 KB)

gps.csv (1.2 KB)

2 Likes

@ambassadors for your learning and sharing!

1 Like