What do you need help with?
Search the knowledge base, browse our resources, and visit our forum for more detailed information
Search the knowledge base, browse our resources, and visit our forum for more detailed information
Last updated: 30 Jul 2022
In KoboToolbox, you can collect GPS coordinates as part of your data collection form. There are 3 GPS question types you can use, namely “Point”, “Line” and “Area”.
Use a “Point” question type when you want to record a single GPS coordinate. This is perfect for questions where you need to show the location of a single feature such as a house, or a borehole.
Use a “Line” question type when you want to record multiple GPS points to trace a path. This question type can be used for collecting location data on features such as roads, tracks and rivers.
The “Area” question type is used for collecting multiple GPS points that form the boundaries of a feature. You can use it, for example, to trace the boundaries of garden plots in a survey where you are enumerating land holdings.
Adding GPS questions on the form is simple:
In the formbuilder, click the button to add a new question
Type the question text, for example “Capture the location of the housing unit”, then click ADD QUESTION or press ENTER on your keyboard
Choose the question type (e.g. Point)
You can add “Point”, “Line” and “Area” questions in XLSForm by using geopoint
,
geotrace
and geoshape
question types respectively as in the following
example:
type |
name |
label |
---|---|---|
geopoint |
point |
Capture the location of the housing unit |
geotrace |
road |
Trace out the road’s route |
geoshape |
garden |
Trace the boundary of the garden |
survey |
Besides including GPS questions in your form, you can also collect GPS
coordinates in the background while data is being collected. This is possible by
turning on the “Audit” option in the formbuilder (Layout & Settings -> Meta
questions) or by adding the audit
meta question to your XLSForm. Learn more
about how to do this here.
As you collect your GPS data, you might need to calculate the distance and area from your “Line” and “Area” questions.
To calculate the distance from a “Line” question type in the formbuilder, use
the “Calculate” question type and the
distance()
function as shown below:
In the example above, the question “Trace the route of the track” has been added as a “Line” question type. The “Data Column Name” in the question settings has been set to “track”.
The question with label distance(${track})
is a “Calculate” question type with
a “Data Column Name” of “distance”. The result will be in meters.
The “Note” question is optional and has been added with the purpose of displaying the calculated distance within the form.
In XLSForm, you can do the same as follows:
type |
name |
label |
calculation |
---|---|---|---|
geotrace |
track |
Trace the route of the track |
|
calculate |
distance |
distance(${track}) |
|
note |
display_distance |
The distance is ${distance} meters |
|
survey |
You can calculate an area using the “Calculate” question type and the
area()
function as
shown below:
In the example above, the question “Trace the boundaries” has been added as an “Area” question type. The “Data Column Name” in the question settings has been set to “boundary”.
The question with label area(${boundary})
is a “Calculate” question type with
Data Column Name “area”. The result will be in square meters.
The “Note” question is optional and has been added with the purpose of displaying the calculated area within the form.
In XLSForm, you can do the same, as follows:
type |
name |
label |
calculation |
---|---|---|---|
geoshape |
boundary |
Trace the boundaries |
|
calculate |
area |
area(${boundary}) |
|
note |
display_area |
The area is ${area} square meters |
|
survey |
You can download an XLSForm with examples from this article here.
Did you find what you were looking for? Was the information clear? Was anything missing?
Share your feedback to help us improve this article!
KoboToolbox is maintained by Kobo Inc.