Linear and poligon GPS questions

Hi,

Is it possible to have a GPS question that is linear (for example when
surveying about a road) or a poligonal (i.e breadcrumbing the borders of
plots of land)?

Thank you

··· --

http://www.arnalich.com/
Santiago Arnalich
Consultant, lecturer and author
+34 671700686
skype: sarnalich
...
www.arnalich.com
Consultancy & training for Development

The GeoPoint prompt and the javarosa code only support single geopoints.

There are two alternatives, both require Java programming:

Alternative #1 (quick-and-dirty):

(1) Use a string field in the form to store the GPS coordinates as an
uninterpreted string. See the String from 3rd party app example on the
example widgets page. http://opendatakit.org/help/form-design/examples/
(2) write a custom app that ODK Collect could launch to gather your
structured GPS coordinates, and have that app return the coordinates in a
formatted String 'result' field in the return Bundle.

Alternative #2 (more general):

(1) Modify ODK Collect to support the launch of an external app (intent)
for an XForms tag (via appearance="intent:..." much like we do for
the ExString widget). Upon returning from the external app, write code to
extract field values from the returned data Bundle into the fields within
that group.
(2) write a custom app that ODK Collect could launch to gather your
structured GPS coordinates, and have that app return the coordinates as
individual data fields in the return Bundle.

··· -------------- When using Alternative #1, you would want the form to define a set of calculated fields that pick apart the return string and store the coordinate values as numbers in each of these calculated fields. Then, you can directly access those calculated fields in subsequent formulas, and the data will be directly available when submitted to ODK Aggregate or other backend tools (though those tools will not automatically know they are GPS coordinates).

If you do Alternative 2, we would gratefully accept the code changes back
into the main tree.

Mitch

On Tue, Jan 22, 2013 at 3:19 AM, Santiago Arnalich < coordinacion@arnalich.com> wrote:

Hi,

Is it possible to have a GPS question that is linear (for example when
surveying about a road) or a poligonal (i.e breadcrumbing the borders of
plots of land)?

Thank you

--

http://www.arnalich.com/
Santiago Arnalich
Consultant, lecturer and author
+34 671700686
skype: sarnalich
...
www.arnalich.com
Consultancy & training for Development

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Another alternative might be to interpret the records of a repeating group,
that contains a geopoint question, as the vertices of a polygon. With this
approach you can also have other questions that can be asket at each point
of the polygon or line. Also it requires no changes on the client but you
need to do some processing on the server.

I created a custom server that will look for a repeat group that starts
with the name geolinestring or geopolygon and then store the results as a
polygon or linestring in postgis. Here is a video of this in action.

··· On Wed, Jan 23, 2013 at 6:30 AM, Mitch S wrote:

The GeoPoint prompt and the javarosa code only support single geopoints.

There are two alternatives, both require Java programming:

Alternative #1 (quick-and-dirty):

(1) Use a string field in the form to store the GPS coordinates as an
uninterpreted string. See the String from 3rd party app example on the
example widgets page. http://opendatakit.org/help/form-design/examples/
(2) write a custom app that ODK Collect could launch to gather your
structured GPS coordinates, and have that app return the coordinates in a
formatted String 'result' field in the return Bundle.

Alternative #2 (more general):

(1) Modify ODK Collect to support the launch of an external app (intent)
for an XForms tag (via appearance="intent:..." much like we do for
the ExString widget). Upon returning from the external app, write code to
extract field values from the returned data Bundle into the fields within
that group.
(2) write a custom app that ODK Collect could launch to gather your
structured GPS coordinates, and have that app return the coordinates as
individual data fields in the return Bundle.


When using Alternative #1, you would want the form to define a set of
calculated fields that pick apart the return string and store the
coordinate values as numbers in each of these calculated fields. Then, you
can directly access those calculated fields in subsequent formulas, and the
data will be directly available when submitted to ODK Aggregate or other
backend tools (though those tools will not automatically know they are GPS
coordinates).

If you do Alternative 2, we would gratefully accept the code changes back
into the main tree.

Mitch

On Tue, Jan 22, 2013 at 3:19 AM, Santiago Arnalich < coordinacion@arnalich.com> wrote:

Hi,

Is it possible to have a GPS question that is linear (for example when
surveying about a road) or a poligonal (i.e breadcrumbing the borders of
plots of land)?

Thank you

--

http://www.arnalich.com/
Santiago Arnalich
Consultant, lecturer and author
+34 671700686
skype: sarnalich
...
www.arnalich.com
Consultancy & training for Development

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--

Smap http://smap.com.au/| Mobile Data Collection Solution
Application Developer - neilpenman@gmail.com minqiang.huang@gmail.com