Note:
The Collector for ArcGIS (Classic) help site is retired and no longer being updated. To learn about Collector retirement and to find the latest information on data collection, see Collector retirement.
In this exercise, you'll build a copy of the Damage Assessments feature layer. You'll create a geodatabase in ArcMap, create domains, add a feature class, and add the correct field types and configure them to meet the requirements of the data collection form. Once you have configured the information model, you will build a map in ArcMap and publish a feature service to your organization. In the next exercise in this series, the service will be leveraged as a layer in a map and used by your mobile workforce to collect information in the field.
Note:
Completing this exercise requires an ArcGIS organizational account with the ability to publish hosted feature services. This includes publishers and administrators.
Create your geodatabase
Geodatabases organize and store data you collect. Ultimately you'll create a feature class to store damage assessment reports, but first you need to create the geodatabase that holds the feature class. Take the following steps to create a file geodatabase by using the Catalog window in ArcMap.
- Start ArcMap and open the Catalog window.
- Right-click the file folder in the Catalog tree where you want to create the file geodatabase.
- Point to New.
- Click File Geodatabase to create a new file geodatabase in the location you selected. Name your geodatabase Tutorial.
Define geodatabase domains
Some fields in your data should be populated from a set of choices. By creating domains in your geodatabase, you provide a list of choices data collectors can choose from when they are working. Later in this exercise, when you set up the fields, you'll use the domain.
- In the Catalog tree, right-click the geodatabase and click Properties.
- Click the Domains tab.
- Click the first empty field under Domain Name and type ExtentDamage for the new domain. Press the Tab key or click the new domain's description field, and type a description for the domain.
Tip:
When creating a new domain, specify a name that describes the parameter it governs. The description is a small sentence describing the purpose of the domain.
- Click the field next to Domain Type, click the drop-down arrow, click Coded Values from the list of domain types, and choose Text as the Field Type.
- Click the first empty field under Coded Values and type Affected for the first valid code.
Tip:
When entering coded values, make sure the code field matches the field type specified in the domain properties.
- Press the Tab key or click the new coded value's Description field. Type Affected as the user-friendly description for this coded value.
- Repeat steps 5 and 6 until all valid values and their descriptions have been typed. The end product resembles the following image:
- Click OK to create the new domain in the geodatabase and close the dialog box.
Define the feature class
Next, you'll create the feature class to hold the collected information. Feature classes are essentially containers for information, where the pieces of information share similar characteristics, whether that be their geometry or their attributes.
- Right-click the geodatabase, point to New, and click Feature Class.
Note:
A feature class is a collection of features that share the same geometry type and information model.
The New Feature Class wizard opens. It walks you through the necessary steps to customize the feature class.
- Type Damage_to_Residential_Buildings as the name for the feature class, type Damage to Residential Buildings as the alias, and choose Point Features as the feature type. Click Next.
- When creating this feature class, choose a coordinate system. Coordinate systems allow your features to be projected properly and accurately on a map, making the features appear in the correct locations. For this exercise, choose WGS 1984 Web Mercator (auxiliary sphere). Click Next.
- Click Next to accept the default XY Tolerance settings.
- Click Next to accept the default database storage configuration.
Set up the fields
The fields are a key part of your information model. They provide the structure of the information your mobile workers collect and provide rules for the types of information collected about a feature.
- The first field you create will be used to record the number of occupants who live in the building being inspected. Click the first empty field and type NUMOCCUP for Field Name. Under Data Type, choose Long Integer.
- Under Field Properties, click the Alias check box, and change the default alias NUMOCCUP to Number of Occupants. The alias is what your mobile workers see on the data collection form, so it's important that it makes sense to them.
- The next field you create takes advantage of the coded domain created earlier in this exercise. Click the next empty field and type TYPDAMAGE. Choose Text as the data type.
- Under Field Properties, type Extent of Damage as the alias for the field.
- Click the empty Domain text box, and choose ExtentDamage.
- The final field to add is the description field. Name this field DESCDAMAGE and make it a text field. Update the alias to Description of Damage.
Note:
The full damage assessment template has more features than described in this exercise. However, you can continue the Collector exercises using just the three fields you created. For a complete set of fields, download the Damage Assessment Template map package.
- Click Finish to complete the feature class creation.
The feature class you created is added to the map and appears in the table of contents in ArcMap.
- To allow data collectors to take pictures in the field and attach them to their assessment reports, enable attachments on the feature class you just created. To do so, right-click the feature class in the Catalog window, choose Manage, and click Create Attachments.
Theme your data
You've now created your information model. In this section, you'll define how those features look on your map.
- To update how your features look, right-click the layer in the Table of Contents panel, and click Properties.
Note:
If your feature class is not yet on the map, drag the feature class from the Catalog window into the Table of Contents panel in ArcMap.
- Click the Symbology tab.
- Click the Categories section under the Symbology tab and choose Unique values.
- In the Value Field drop-down list, choose the Extent of Damage field and click Add All Values.
- Right-click the first value in the list and click Properties for All Symbols.
- In the Symbol Selector, search for House. Under Civic, choose House 1 and click OK.
- Double-click each house icon, and choose a different color for each of the house symbols.
- Click Apply and click OK. The symbols update in the table of contents.
- Click File and click Save to save your map document. Name your map document Damage_Assessment.mxd.
Publish your data
Your data needs to be available online to use it in your map. You can publish the data to your ArcGIS Server or to your ArcGIS organization. In this exercise, you'll publish the service to your ArcGIS organization, where it will be available as a layer that you can add to your maps.
Note:
Publishing requires an ArcGIS organizational account with the ability to publish hosted feature services. This includes publishers and administrators.
- If you're not already signed in to your ArcGIS organization in ArcGIS Desktop, sign in.
- Click the File menu, choose Share As, and click Service.
The Share as Service dialog box opens.
- On the Share as Service dialog box, confirm the Publish a service option is selected. Click Next.
The Publish a Service dialog box opens.
- On the Publish a Service dialog box, expand the Choose a connection drop-down list and choose My Hosted Services (your organization name).
- Type Damage_Assessment as the service name and click Continue.
The Service Editor window opens.
- In the left pane on the Service Editor window, click Capabilities.
- In the right pane, check the Feature Access check box, and uncheck the Tiled Mapping check box.
This specifies that you'll publish a feature service rather than a tiled map service.
- Under Feature Access, check Create, Update, Delete, and Sync.
These options specify what data collectors in the field can do with the data. For this exercise, data collectors need to be able to add new damage assessments as well as edit and delete existing ones, so you enable options to create, update, and delete. Sync is enabled to allow them to take the map offline. For details about creating maps for offline use, see Prepare maps for offline use.
- In the left pane, click Item Description.
- Add a Data tag. Type the following for the Summary and Description: This is for the Collector Create maps tutorial.
- On the Service Editor toolbar, click Publish.
You'll see various status messages as the service publishes, and then you'll see a result message.
- Click OK on the result message.
- Minimize ArcMap or exit the ArcMap application. Save your changes if prompted.
Now that you've created your information model, defined a domain to improve data quality in the field, and published your data, you are ready to create and share a map for your mobile workforce to use.