Knowledge base

Capture Multiple Geometries Inside a Single Survey123 Form

Survey123 for ArcGIS is limited to creating only one geometry record for each survey submitted, when attempting to publish a survey with more than one geometry, for instance multiple geopoints or moisture of polygons and points in the same survey, the following error is returned:

null 891

Consider the following scenario…

It is necessary to record details of properties in a neighborhood. For this use case, we need to collect the boundary of the parcel, the footprint of the building and the location of the main water taps in the property to measure the water consumption.

To map this case we will start defining the main parcel:

null 892

null 893

This configuration allows the capture of the parcel boundaries, to capture the footprint of the building we need to add another geoshape that we are going to call building:

null 894

The problem with this configuration is that the two (2) geoshapes configured in the same survey, will show this error when trying to publish the survey:

null 895

To better understand the issue, let’s take a look on the schema generated by the survey:

null 896

Both geoshapes are in the same table which is not possible in the general architecture of the geodatabase. To resolve the issue it is necessary to divide the tables. This is done in Survey123 using the repeat feature.

Repeats are like sub-forms meaning that can be considered like a form within a form that can also be completed multiple times. To add a repeat to our form we need to enclose a set of questions within a begin repeat and end repeat set, as shown below:

null 897

The inclusion of the repeat creates a new table (layer) associated with the form that will contain the details of the building, the schema now includes the new table with the geoshape (footprint) and other attributes.

The schema below shows the main layer of the feature service named “MultiGeometry” and an associated layer “rptBuilding” that contains the footprint of the building and the attribute defined.

null 898

Survey123 repeats are modeled in ArcGIS as related tables (or related layers if your repeat includes a geopoint, geoshape or geotrace question). In the example of the multigeometry survey above, the information about the parcel is kept in the main layer of a feature service, and the data from the building (footprint, building type) is modeled as a separate, but related table. The relationship between the tables/layers is kept through internally created global IDs.

Additionally we can use the “repeat_count” row in the XLSForm to control how many records must exist within a repeat. In our example, if we set the value for the repeat_count to two (2), the survey will initialize the repeat with 2 empty records.

null 900

null 902

Now let’s add the points for the water taps as another repeat section in the survey.

null 904

null 906

The form we just created will allow us to capture the required information about the properties. The final result is displayed in the following image which displays the three (3) linked layers: MultiGeometry, Building Details, and Water taps in the property.

null 907