Distance and area measurement

Hi,

I am the developer of the android application "Distance and area measurement", which I know has been discussed to be incorporated into OpenDataKit in the past. I would therefore like to inform you that the application now has been turned into a webpage that should be easy to incorporate through a webview.

/Kristofer Björnson

Just realized that I probably should let you know the address as well
https://www.georuler.com

··· On Tuesday, April 25, 2017 at 5:58:35 PM UTC+2, con...@georuler.com wrote: > Hi, > > I am the developer of the android application "Distance and area measurement", which I know has been discussed to be incorporated into OpenDataKit in the past. I would therefore like to inform you that the application now has been turned into a webpage that should be easy to incorporate through a webview. > > /Kristofer Björnson

This is a really neat idea, Kristofer! The challenge of integrating
the web view into Collect is that we don't really have hooks to take
whatever result you get in the web view and get that back to Collect
where it can be persisted. Any ideas on how we'd do that?

Yaw

··· On Tue, Apr 25, 2017 at 12:14 PM, wrote: > On Tuesday, April 25, 2017 at 5:58:35 PM UTC+2, con...@georuler.com wrote: >> Hi, >> >> I am the developer of the android application "Distance and area measurement", which I know has been discussed to be incorporated into OpenDataKit in the past. I would therefore like to inform you that the application now has been turned into a webpage that should be easy to incorporate through a webview. >> >> /Kristofer Björnson > > Just realized that I probably should let you know the address as well > https://www.georuler.com > > -- > You received this message because you are subscribed to the Google Groups "ODK Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.

Maybe we can work something out if it is of interest to you. What kind of
data would you like to have? All GPS coordinates of the path, distance,
area?

/Kristofer Björnson

··· On Wed, May 3, 2017 at 7:26 PM, Yaw Anokwa wrote:

This is a really neat idea, Kristofer! The challenge of integrating
the web view into Collect is that we don't really have hooks to take
whatever result you get in the web view and get that back to Collect
where it can be persisted. Any ideas on how we'd do that?

Yaw

On Tue, Apr 25, 2017 at 12:14 PM, dafer45@gmail.com wrote:

On Tuesday, April 25, 2017 at 5:58:35 PM UTC+2, con...@georuler.com wrote:

Hi,

I am the developer of the android application "Distance and area
measurement", which I know has been discussed to be incorporated into
OpenDataKit in the past. I would therefore like to inform you that the
application now has been turned into a webpage that should be easy to
incorporate through a webview.

/Kristofer Björnson

Just realized that I probably should let you know the address as well
https://www.georuler.com

--
You received this message because you are subscribed to the Google
Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maybe we can work something out if it is of interest to you. What kind of
data would you like to have? All GPS coordinates of the path, distance,
area?

FYI - the existing XForms data types (look here
https://opendatakit.github.io/xforms-spec/#data-types) geotrace (line)
and geoshape (polygon) can take your list of GPS coords. Distance and area
would need to be treated differently in the XForm/by ODK Collect, in that
these would probably map - as distinct values - to the existing basic data
type decimal, whose value would then be captured in the XForms client by
presenting a map widget, having the user trace the line/polygon, and have
the widget calculate and return the corresponding length or area. And to
kick off such a map widget would probably require adding a new appearance
setting to the decimal type to indicate such.

That is all to say, there's existing definitions in the XForms spec to
handle your GPS coordinates, but supporting distance and area too would
require establishing new appearances (IMO). Unfortunately there is no
existing XForms data type that will encompass all three - GPS+distance+area

  • as a single entity [unlike geopoint which lets you supplement the basic
    lat+long with accuracy and elevation data].

  • Gareth

··· On Thursday, May 4, 2017 at 7:32:06 AM UTC+12, Kristofer Björnson wrote:

In my opinion the conversion to the XForm data format is best done on the
ODK side. We could attach hooks like

window.coordinateLogger.getGPSCoordinates();
window.coordinateLogger.getArea();
window.coordinateLogger.getDistance();

to the application itself, which returns a linear array of GPS coordinates
and two numbers, respectively.

Note: I cc Anna Sinelnikova who also is a developer of GEOruler.

/Kristofer Björnson

··· On Wed, May 3, 2017 at 11:57 PM, wrote:

On Thursday, May 4, 2017 at 7:32:06 AM UTC+12, Kristofer Björnson wrote:

Maybe we can work something out if it is of interest to you. What kind of
data would you like to have? All GPS coordinates of the path, distance,
area?

FYI - the existing XForms data types (look here
https://opendatakit.github.io/xforms-spec/#data-types) geotrace (line)
and geoshape (polygon) can take your list of GPS coords. Distance and
area would need to be treated differently in the XForm/by ODK Collect, in
that these would probably map - as distinct values - to the existing basic
data type decimal, whose value would then be captured in the XForms client
by presenting a map widget, having the user trace the line/polygon, and
have the widget calculate and return the corresponding length or area. And
to kick off such a map widget would probably require adding a new
appearance setting to the decimal type to indicate such.

That is all to say, there's existing definitions in the XForms spec to
handle your GPS coordinates, but supporting distance and area too would
require establishing new appearances (IMO). Unfortunately there is no
existing XForms data type that will encompass all three - GPS+distance+area

  • as a single entity [unlike geopoint which lets you supplement the basic
    lat+long with accuracy and elevation data].

  • Gareth

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/opendatakit-developers/gQrS20_LMBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

'shape' (closed polygon) by having the first and last GPS coords the same
(ie polygon) or not (ie line)? Not really an issue for getArea() - if
called you can assume polygon and treat whatever GPS coords as representing
a closed circuit. But for getDistance() I'm not sure how you'd determine
whether to return the path length (unclosed) vs perimeter (closed) of the
points...? Having the first and last coords of a polygon be the same would
eliminate any ambiguity.

  • Gareth
··· On Thursday, May 4, 2017 at 9:30:16 PM UTC+12, Kristofer Björnson wrote: > > In my opinion the conversion to the XForm data format is best done on the > ODK side. We could attach hooks like > > window.coordinateLogger.getGPSCoordinates(); > window.coordinateLogger.getArea(); > window.coordinateLogger.getDistance(); > > to the application itself, which returns a linear array of GPS coordinates > and two numbers, respectively. > > Note: I cc Anna Sinelnikova who also is a developer of GEOruler. > > Seems reasonsable. Would you distinguish returning a 'path' (line) vs

BTW, there's already the area() function implemented in both Collect and
Enketo. And a distance-between(), I believe. How would the proposed
functionality be different?

Chris

··· On Thu, May 4, 2017, 5:42 PM wrote:

On Thursday, May 4, 2017 at 9:30:16 PM UTC+12, Kristofer Björnson wrote:

In my opinion the conversion to the XForm data format is best done on the
ODK side. We could attach hooks like

window.coordinateLogger.getGPSCoordinates();
window.coordinateLogger.getArea();
window.coordinateLogger.getDistance();

to the application itself, which returns a linear array of GPS
coordinates and two numbers, respectively.

Note: I cc Anna Sinelnikova who also is a developer of GEOruler.

Seems reasonsable. Would you distinguish returning a 'path' (line) vs
'shape' (closed polygon) by having the first and last GPS coords the same
(ie polygon) or not (ie line)? Not really an issue for getArea() - if
called you can assume polygon and treat whatever GPS coords as representing
a closed circuit. But for getDistance() I'm not sure how you'd determine
whether to return the path length (unclosed) vs perimeter (closed) of the
points...? Having the first and last coords of a polygon be the same would
eliminate any ambiguity.

  • Gareth

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gareth:

Because the application continuously report the distance and area as it is
being measured, the stored data is on the format that you describe as a
line. The calculation is done such that the result is the area contained by
the shape that results by joining the end point and start point with a
straight line.

Chris:

I have to admit that I am not aware of exactly what capabilities you have
in ODK and it may very well be that you even want to rely on your own
distance and area functions. In particular, this application can only
handle areas small enough that the earths curvature is not significant,
like if measuring a whole continent or so, so if you can do better there is
certainly reason to use your own area calculation function). The reason I'm
reaching out to you is because I was informed a few years back by Eric
Cooper at Afsis that there was interest in incorporatingwhat was then my
android application into ODK and that some students at Stanford was trying
to do so during a Facebook hackathon. With the new website, this should be
much easier. Regarding what functionality that this brings, it is the
possibility to physically trace out paths by walking/driving around the
region of interest.

/Kristofer Björnson

··· On Thu, May 4, 2017 at 11:55 PM, Christopher Robert wrote:

BTW, there's already the area() function implemented in both Collect and
Enketo. And a distance-between(), I believe. How would the proposed
functionality be different?

Chris

On Thu, May 4, 2017, 5:42 PM xiphware@gmail.com wrote:

On Thursday, May 4, 2017 at 9:30:16 PM UTC+12, Kristofer Björnson wrote:

In my opinion the conversion to the XForm data format is best done on
the ODK side. We could attach hooks like

window.coordinateLogger.getGPSCoordinates();
window.coordinateLogger.getArea();
window.coordinateLogger.getDistance();

to the application itself, which returns a linear array of GPS
coordinates and two numbers, respectively.

Note: I cc Anna Sinelnikova who also is a developer of GEOruler.

Seems reasonsable. Would you distinguish returning a 'path' (line) vs
'shape' (closed polygon) by having the first and last GPS coords the same
(ie polygon) or not (ie line)? Not really an issue for getArea() - if
called you can assume polygon and treat whatever GPS coords as representing
a closed circuit. But for getDistance() I'm not sure how you'd determine
whether to return the path length (unclosed) vs perimeter (closed) of the
points...? Having the first and last coords of a polygon be the same would
eliminate any ambiguity.

  • Gareth

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/opendatakit-developers/gQrS20_LMBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris: are the area() and distance-between() you describe XPath functions,
or something else? And do they do compute geodesic (ie curved surface) area
and distance, or just assume flat earth?

cheers,

  • Gareth
··· On Friday, May 5, 2017 at 9:56:10 AM UTC+12, Christopher Robert wrote: > > BTW, there's already the area() function implemented in both Collect and > Enketo. And a distance-between(), I believe. How would the proposed > functionality be different? > > Chris >

They're custom functions added to ODK in 2015 or 2016, and I do believe
that they presume flat earth (are generally used for small areas only, like
agricultural plots or maybe, at largest, the borders of refugee camps).
They use pretty standard mathematics for approximation. The area() function
is in XPathFuncExpr.java
XPathFuncExpr.javahttps://github.com/opendatakit/javarosa/blob/82be6fb967da741e4ceb8ba104e4b74767ffdbdf/src/org/javarosa/xpath/expr/XPathFuncExpr.java,
and it looks like distance-between() isn't in there for some reason --
perhaps because we couldn't quickly reach agreement on a suitable name that
the community liked. (However, we have it in SurveyCTO and are happy to
share it anytime.)

Best,

Chris

··· On Mon, May 8, 2017 at 9:04 PM wrote:

On Friday, May 5, 2017 at 9:56:10 AM UTC+12, Christopher Robert wrote:

BTW, there's already the area() function implemented in both Collect and
Enketo. And a distance-between(), I believe. How would the proposed
functionality be different?

Chris

Chris: are the area() and distance-between() you describe XPath functions,
or something else? And do they do compute geodesic (ie curved surface) area
and distance, or just assume flat earth?

cheers,

  • Gareth

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

1 Like

Cheers, I assume they'd be used in something like
but I'd love to see a real working form with all the pieces to confirm.

  • Gareth
··· On Tuesday, May 9, 2017 at 1:13:01 PM UTC+12, Christopher Robert wrote: > > They're custom functions added to ODK in 2015 or 2016, and I do believe > that they presume flat earth (are generally used for small areas only, like > agricultural plots or maybe, at largest, the borders of refugee camps). > They use pretty standard mathematics for approximation. The area() function > is in XPathFuncExpr.java, and it looks like distance-between() isn't in > there for some reason -- perhaps because we couldn't quickly reach > agreement on a suitable name that the community liked. (However, we have it > in SurveyCTO and are happy to share it anytime.) > > Best, > > Chris > > > On Mon, May 8, 2017 at 9:04 PM <xiph...@gmail.com > wrote: > >> On Friday, May 5, 2017 at 9:56:10 AM UTC+12, Christopher Robert wrote: >>> >>> BTW, there's already the area() function implemented in both Collect and >>> Enketo. And a distance-between(), I believe. How would the proposed >>> functionality be different? >>> >>> Chris >>> >> >> Chris: are the area() and distance-between() you describe XPath >> functions, or something else? And do they do compute geodesic (ie curved >> surface) area and distance, or just assume flat earth? >> >> cheers, >> >> - Gareth >> >> -- >> You received this message because you are subscribed to the Google Groups >> "ODK Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit-developers+unsubscribe@googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. >> >

Here is an
example: https://docs.google.com/spreadsheets/d/1oiMpJbqakmdrMUs94vQY6-N83oZj1fuyJYffBMV0Pd0/edit?usp=sharing

Live (temporary
link): https://odk.enke.to/preview?form=http://23.21.114.69/xlsform/downloads/tmp4b2ekddb/area.xml

··· On Tuesday, May 9, 2017 at 5:14:35 AM UTC-6, xiph...@gmail.com wrote: > > Cheers, I assume they'd be used in something like nodeset='/data/totalarea' type='decimal' calculate='area(/data/perimeter)'> > but I'd love to see a real working form with all the pieces to confirm. > > - Gareth > > On Tuesday, May 9, 2017 at 1:13:01 PM UTC+12, Christopher Robert wrote: >> >> They're custom functions added to ODK in 2015 or 2016, and I do believe >> that they presume flat earth (are generally used for small areas only, like >> agricultural plots or maybe, at largest, the borders of refugee camps). >> They use pretty standard mathematics for approximation. The area() function >> is in XPathFuncExpr.java, and it looks like distance-between() isn't in >> there for some reason -- perhaps because we couldn't quickly reach >> agreement on a suitable name that the community liked. (However, we have it >> in SurveyCTO and are happy to share it anytime.) >> >> Best, >> >> Chris >> >> >> On Mon, May 8, 2017 at 9:04 PM wrote: >> >>> On Friday, May 5, 2017 at 9:56:10 AM UTC+12, Christopher Robert wrote: >>>> >>>> BTW, there's already the area() function implemented in both Collect >>>> and Enketo. And a distance-between(), I believe. How would the proposed >>>> functionality be different? >>>> >>>> Chris >>>> >>> >>> Chris: are the area() and distance-between() you describe XPath >>> functions, or something else? And do they do compute geodesic (ie curved >>> surface) area and distance, or just assume flat earth? >>> >>> cheers, >>> >>> - Gareth >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "ODK Developers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to opendatakit-developers+unsubscribe@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >>

This seems very compatible with what we have to provide.

/Kristofer Björnson

··· On Wed, May 10, 2017 at 4:19 PM, Martijn van de Rijdt wrote:

Here is an example: https://docs.google.com/spreadsheets/d/
1oiMpJbqakmdrMUs94vQY6-N83oZj1fuyJYffBMV0Pd0/edit?usp=sharing

Live (temporary link): https://odk.enke.to/preview?form=http://23.21.114.
69/xlsform/downloads/tmp4b2ekddb/area.xml

On Tuesday, May 9, 2017 at 5:14:35 AM UTC-6, xiph...@gmail.com wrote:

Cheers, I assume they'd be used in something like
but I'd love to see a real working form with all the pieces to confirm.

  • Gareth

On Tuesday, May 9, 2017 at 1:13:01 PM UTC+12, Christopher Robert wrote:

They're custom functions added to ODK in 2015 or 2016, and I do believe
that they presume flat earth (are generally used for small areas only, like
agricultural plots or maybe, at largest, the borders of refugee camps).
They use pretty standard mathematics for approximation. The area() function
is in XPathFuncExpr.java, and it looks like distance-between() isn't in
there for some reason -- perhaps because we couldn't quickly reach
agreement on a suitable name that the community liked. (However, we have it
in SurveyCTO and are happy to share it anytime.)

Best,

Chris

On Mon, May 8, 2017 at 9:04 PM xiph...@gmail.com wrote:

On Friday, May 5, 2017 at 9:56:10 AM UTC+12, Christopher Robert wrote:

BTW, there's already the area() function implemented in both Collect
and Enketo. And a distance-between(), I believe. How would the proposed
functionality be different?

Chris

Chris: are the area() and distance-between() you describe XPath
functions, or something else? And do they do compute geodesic (ie curved
surface) area and distance, or just assume flat earth?

cheers,

  • Gareth

--
You received this message because you are subscribed to the Google
Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Revolutionizing data collection since 2012.

Enketo https://enketo.org/ | LinkedIn
http://www.linkedin.com/company/enketo-llc | GitHub
https://github.com/enketo | Twitter https://twitter.com/enketo
| Blog http://blog.enketo.org/

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/opendatakit-developers/gQrS20_LMBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks!

··· On Thursday, May 11, 2017 at 2:19:05 AM UTC+12, Martijn van de Rijdt wrote: > > Here is an example: > https://docs.google.com/spreadsheets/d/1oiMpJbqakmdrMUs94vQY6-N83oZj1fuyJYffBMV0Pd0/edit?usp=sharing > > Live (temporary link): > https://odk.enke.to/preview?form=http://23.21.114.69/xlsform/downloads/tmp4b2ekddb/area.xml >

Sounds like area() as it exists is adequate and that we should look at
adding distance-between() (or something similar).

I've filed an issue at
https://github.com/opendatakit/xforms-spec/issues/129 so we don't
forget it.

Yaw

··· On Thu, May 11, 2017 at 2:49 PM, wrote: > Thanks! > > On Thursday, May 11, 2017 at 2:19:05 AM UTC+12, Martijn van de Rijdt wrote: >> >> Here is an example: >> https://docs.google.com/spreadsheets/d/1oiMpJbqakmdrMUs94vQY6-N83oZj1fuyJYffBMV0Pd0/edit?usp=sharing >> >> Live (temporary link): >> https://odk.enke.to/preview?form=http://23.21.114.69/xlsform/downloads/tmp4b2ekddb/area.xml > > -- > You received this message because you are subscribed to the Google Groups > "ODK Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit-developers+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.