GPS lines: measuring distance in real-time

Hi KoBo GPS enthusiasts,

I’m looking for a way of building a polygon around a primary GPS point, in real-time for a specific type of health intervention.

Ideally, I would have:

  • (1) a primary point
  • (2) 4 points making a diamond shape around the primary point.
  • The data collector would take the primary point using the geopoint function
  • The data collector word use the geoline function to draw 4 lines from the primary point that extend to 100 metres in 4 different directions (producing 4 lines from the primary point to 4 different new points)
  • An internal calculation can then make a polygon around the primary point, based on the 4 points. Voila.

I think I can do all of this, but the issue is for the data collector to be able to visualize the distance in real-time on a map. Can a configuration be done in OSM to produce the following labeling of the line on the map with a distance? (see picture for an example).

Thanks in advance for any insight!

Ruwan

Pic

Welcome back to the community, @rratnaya! I don’t think this is possible, but I am leaving this open to the community to chime in the discussion.

However, at the same time, I am also sharing the xlsform to demonstrate how distance can be calculated in KoBoToolbox using geopoint and geotrace. Maybe it should be helpful to those, who wish to measure distance in their project(s).

In the survey tab of your xlsform:

Reference xlsform:

Calculating Length.xls (29.5 KB)

Thanks a lot Kal Lam, I do appreciate it. Yes! I had used exactly that method to allow the data collector to verify that the distance between two geo-points was >=100 metres. Works very well.

I wonder if I could extend this to a geo-line as well.

Hi @rratnaya
I believe the solution you are looking for could be answered by adopting the approach detailed by @Xiphware within the ODK Forum

You can combine the geofence with a length restriction outlined by @Kal_Lam above.

Regards,
Stephane

2 Likes

Thank you Stephane, this may be what I am looking for!
R

1 Like

Now, I have a means of taking the coordinates for the desired polygon, checking them against the distance requirement from a central point, and saving the lat and long coordinates.

I would like to immediately display this as a geoshape on a map on the device itself. Is there a means to do display a polygon with these points?

Thank you!