Explore layer attributes
First, you'll investigate current hiking trail data and identify opportunities to implement and apply attribute data validation to streamline data maintenance and consistency.
Explore a map of hiking trails
You'll review line features representing hiking trails around Vienna, Austria. You'll investigate the current attribute values and consider how the use of GIS and attribute validation can support data integrity and improve organizational efficiency for users of the hiking trail data available from the City of Vienna.
- Open the City of Vienna's Vienna City Map.
This page contains the city's current hiking trail map. The trails are displayed as green lines.
Note:
Trails may not be displayed on the map by default. To turn on trails, under Show on the map, scroll to City walks and check the City hiking trail layer.
- On the map, click a hiking trail and review the pop-up.
- In the pop-up, click Further information.
A new page appears. It contains additional details about the trail you clicked.
While the map provides a great service, it would be even more useful if the additional details were available as attributes for each hiking trail. That way, the information could be displayed in the trail's pop-up, which would eliminate the need to navigate to a new page. Furthermore, when new trails are created, it would be a more streamlined process to populate trail attributes because geodatabase attribute validation techniques will be applied.
- Close the additional details page and the page with the Vienna City Map.
Download the data
Next, you'll download a project package containing the data used in this tutorial and open the package in ArcGIS Pro. You'll add some of the data from a geodatabase to a map.
- Go to the Vienna item in ArcGIS Online.
This project package contains the data used in this tutorial.
- Click Open in ArcGIS Pro.
The content is downloaded as a package called item.pitemx.
Note:
If you prefer, you can download and open the project package separately. To do so, click Download. Locate the downloaded Vienna.ppkx on your computer. If necessary, copy and move the file to a suitable location, then double-click it to open the package in ArcGIS Pro.
- Open item.pitemx. If prompted, in ArcGIS Pro, sign in using your licensed ArcGIS account.
Note:
If you don't have access to ArcGIS Pro or an ArcGIS organizational account, see options for software access.
The package opens in ArcGIS Pro. It contains a map zoomed to Vienna.
- In the Catalog pane, expand the Databases folder and expand vienna.gdb.
Tip:
If the Catalog pane isn't open, click the View tab on the ribbon. In the Windows group, click Catalog Pane.
- Right-click ViennaCityTrails_Raw and choose Add To Current Map.
Tip:
In ArcGIS Pro, you can personalize the appearance of the user interface with either a light or a dark theme. In this tutorial, the example images use the dark theme, but you can choose the theme that you prefer. If you want to change the theme, click Project on the ribbon. Click Options. In the Options window, under Application, click General. Expand Application Theme and choose Dark. You'll need to restart ArcGIS Pro for your theme changes to take effect.
The Vienna City Trails layer appears on the map with default symbology.
Note:
The symbology color of the layer may differ from the example image, but it does not impact the results of the analysis.
- In the Contents pane, uncheck the Vienna City Trails layer to turn it off.
- In the Catalog pane, under vienna.gdb, drag RundumadumTrail_Subtypes onto the map. If necessary, in the Contents pane, turn on the Rundumadum Trail Stages layer.
This layer is already symbolized with a different color for each trail stage. When a layer contains subtypes, ArcGIS Pro automatically applies Unique Values symbology to the attribute with subtypes.
The Rundumadum Trail Stages layer has a subtype applied to its TrailStage field. Subtypes allow you to categorize or group features within a feature class and offer editors a predefined list of valid attribute choices. A feature class can have a subtype applied to only one of its attribute fields.
Explore the attributes
The Rundumadum Trail Stages layer is symbolized based on its attributes. To better understand the layer's attributes, you'll look at them in the layer's attribute table.
- In the Contents pane, right-click the Rundumadum Trail Stages layer and choose Attribute Table.
The layer's attribute table appears. Attribute tables form the foundation of geographic data and are the fundamental building blocks of any data model. Attribute information in a table is organized into rows and columns. In ArcGIS, rows are known as records, and columns are referred to as fields.
- If necessary, drag and dock the Rundumadum Trail Stages attribute table below the map.
The highlighted field, Trail Stage Number, represents the field to which the subtype has been applied. The field displays a description containing the trail stage name.
Note:
Another way to display a layer's attribute table is to click the layer in the Contents pane. On the ribbon, click the Data tab. In the Table group, click Attribute Table. In addition, the Design group contains buttons for Fields, Subtypes, and Domains. These are tools for working with a data model and updating and modifying the geodatabase schema.
Behind the scenes, the geodatabase stores integer values instead of descriptive names in the subtype field. The integers are paired to the descriptions via a lookup table, which results in smaller file sizes and greater efficiency.
- In the attribute table, click the options button and uncheck Show domain and subtype descriptions.
The table updates to show the subtype codes instead of the descriptions.
- Click the options button and check Show domain and subtype descriptions to display the subtype descriptions.
- With the table selected, on the ribbon, click the Table tab. In the Field group, click Aliases.
The field names switch from displaying field aliases with descriptive names to displaying the original field names. For example, the Trail Stage Number alias becomes the TrailStage field name.
Aliases are a useful way to provide users with descriptive field names without compromising database field name rules that restrict the length and the use of spaces and special characters.
- On the ribbon, click Aliases to switch back to aliases.
- If necessary, in the Contents pane, click the Rundumadum Trail Stages layer to select it.
- On the ribbon, click the Data tab. In the Data Design group, click Fields.
The Fields view appears and displays the layer's attribute fields and properties. In the fields view, you can create fields, delete fields, and modify existing fields.
The *TrailStage field name is bold and preceded by an asterisk to denote that it has a subtype applied. The field's data type is set to Short, which means short integer. Fields with a subtype must be a short or long integer field. The field has an alias of Trail Stage Number.
One of the fields is called BEZ_TEXT. Because the field name is not descriptive, the alias Original Name was set for this field.
- For BEZ_TEXT, double-click the cell containing the alias Original Name.
The cell is highlighted, indicating that you can optionally update or change the current alias. You won't make a change at this time.
- Deselect the cell by clicking elsewhere in the table.
The Data Type column contains the data type for each field. In this table, fields are primarily set to Text, Float, and Short. Internal fields are set to Double. Trail locations (coordinates) are stored in a special field type called Geometry.
Each field in a table stores a specific type of data, as shown in the following table:
Field type Description Text
String of characters
Float
Decimal numbers between -3.4E38 and 1.2E38
Double
Decimal numbers between -2.2E308 and 1.8E308
Short
Whole numbers between -32,768 and 32,767
Long
Whole numbers between -2,147,483,648 and 2,147,483,647
Date
Date or time or both date and time
Blob
A collection of binary data such as images, audio, and other multimedia
Raster
Raster images
GUID
Globally unique identifier
Geometry
Stores x,, coordinate pairs representing spatial features
- Close the Fields view and Rundumadum Trail Stages attribute table. In the Contents pane, uncheck the Rundumadum Trail Stages layer and collapse its legend.
- On the Quick Access Toolbar, click the Save button.
The project is saved.
Add a new field
Next, you'll add a new short integer field that will be used to create a subtype for the Vienna City Trails layer.
- In the Contents pane, turn on the Vienna City Trails layer. Right-click the layer, point to Data Design, and choose Fields.
The Fields view for the layer appears.
- If necessary, position and dock the pane under the map.
- Scroll to the bottom of the Fields view and click Click here to add a new field.
Tip:
New fields can also be added from the ribbon on the Fields tab in the Changes group.
- At the bottom of the table, click Click here to add a new field. In the Field Name column, double-click the current value (Field) and type TrailRating.
Note:
As you make edits, a green indicator appears next to edited rows. A red indicator next to a row indicates an error that will prevent that row from being committed when Save is clicked. To read the error, point to the red indicator. When you correct the error, the indicator turns green again.
- Double-click the empty cell for Alias and type Trail Rating.
- Double-click the Data Type cell and choose Short.
- Check the Highlight box.
The Number Format property allows you to change the display of numeric values, which is useful if you want to limit the number of decimal places shown or express numbers as a percent. However, this won't be necessary for your new Trail Rating field. Even though it will store numeric values, it will not display them as numbers. The integer values will be substituted with subtype descriptions instead.
- On the ribbon, on the Fields tab, in the Manage Edits group, click Save.
Note:
When you save changes made while working in the Fields view, you are updating the geodatabase structure, also known as the geodatabase schema. This is different than editing features in a feature class or attribute table, where you are only changing content.
- Close the Fields view.
- In the Contents pane, right-click the Vienna City Trails layer and choose Attribute Table.
The Trail Rating field has been added to the end of the attribute table.
Populate the field
By default, new fields have no values. You'll edit the Trail Rating field you created to include values based on the length of time it takes to complete each trail.
- In the attribute table, right-click the Estimated Time field and choose Sort Ascending.
For the trails, the rating is based on the estimated time to complete the trail. For example, trails that can be completed in 2.5 to 3 hours are rated as easy.
- Drag the Estimated Time field next to the Trail Rating field.
- For the Trail Rating field, double-click the first cell, type 1, and press Enter.
- In the second cell, type 1 and press Enter.
- In the Save Edits window, click Yes.
- In the attribute table, continue updating the Trail Rating field values using the following table:
Estimated Time Trail Rating 2.5 to 3 hours
1
3 to 4 hours
2
3.5 to 4 hours
2
4 to 4.5 hours
3
4 to 5 hours
3
- In the Vienna City Trails attribute table, confirm that you successfully updated all Trail Rating field values.
- On the ribbon, on the Edit tab, in the Manage Edits group, click Save.
- In the Save Edits window, click Yes.
- Close the attribute table. Save the project.
You've successfully added and populated the field in preparation for applying a subtype based on trail rating. Next, you'll add the subtype descriptions and review the results.
Create subtypes
Next, you'll create a subtype on a field and update codes and descriptions.
Create subtypes for trail ratings
Subtypes allow you to categorize a layer into groups of features that share the same attribute. Using the Subtypes view, you can review the subtypes associated with layers, make edits to the properties of the subtypes, or create subtypes for a layer.
The current Vienna City Trails layer does not have any subtypes defined. You'll create a subtype for the Trail Rating field you added and populated.
- In the Contents pane, click the Vienna City Trails layer to select it.
- On the ribbon, click the Data tab. In the Data Design group, click Subtypes.
The Subtypes view appears. It lists all of the layer's fields in a table.
- If necessary, resize the Subtypes view to display the TrailRating field.
- On the ribbon, in the Subtypes tab, in the Subtypes group, click Create/Manage.
The Manage Subtypes window appears.
- In the Manage Subtypes window, for Subtype Field, choose TrailRating.
You could add a trail rating code and a description for each subtype you need to generate. An easier way to populate the subtype codes is to allow the tool to discover each unique code in the specified subtype field. This is useful if you have many subtypes to create.
- In the Manage Subtypes window, click Discover codes.
The Manage Subtypes pane updates to display three subtype codes. These represent the Trail Rating field values you assigned to the various trails based on the Estimated Time field.
Next, you'll sort the codes and provide a description for each subtype.
- Click Code to sort the subtype codes in ascending order.
You'll add a subtype for new trails that do not yet have a trail rating assigned.
- Double-click the empty cell below 3, type 4, and press Enter.
Next, you'll provide a description for each subtype.
- Under Description, double-click New Subtype1. Type Easy and press Enter.
- Provide a description for each additional subtype, using the following table:
Trail rating Subtype code 1
Easy
2
Moderate
3
Strenuous
4
Unrated
- For Default Subtype, choose Unrated.
- Click OK.
The subtype is created and assigned. The Manage Subtypes window closes.
- On the ribbon, on the Subtypes tab, in the Changes group, click Save.
In the Subtypes view, TrailRating is identified as the subtype field due to it being bold and preceded by an asterisk. In addition, each subtype has the default value set to the subtype code. Columns for default values and domains are added to each subtype.
- Close the Subtypes view. In the Contents pane, right-click Vienna City Trails and choose Attribute Table.
In the attribute table, the Trail Rating field is updated to display the subtype descriptions, rather than the numeric values.
- Close the attribute table.
Symbolize the trails
Next, you'll symbolize the trails layer using the subtype field.
- In the Contents pane, right-click the Vienna City Trails layer and choose Symbology.
The Symbology pane appears.
- In the Symbology pane, for Primary symbology, choose Unique Values. For Field 1, choose Trail Rating.
- On the Classes tab, right-click the line symbol associated with Easy trails. In the color picker, choose Quetzel Green.
Tip:
In the color picker, you can see the name of a color by pointing to it.
The easy trails on the map are now green.
- Change the colors of the other symbols as follows:
- For Moderate, choose Electron Gold (fourth column, third row of the color picker).
- For Strenuous, choose Mars Red (second column, third row of the color picker).
- For Unrated, choose Moorea Blue (ninth column, fourth row of the color picker).
There is an additional symbol class that you do not need to show. Because you've already created a subtype for unrated trails, you can remove the all other values symbol class.
- Click More and uncheck Show all other values.
Your map is now symbolized to more intuitively reflect trail ratings.
- Close the Symbology pane. Save the project.
Use a subtype
You successfully updated the Vienna City Trails feature class by applying a subtype field on the city trails. Subtypes not only enforce integrity by allowing you to choose from a list of valid values, they also allow you to categorize your data. You can set default values on fields in each of the subtypes that will automatically apply when you create features.
Next, you'll add domains to a geodatabase and apply them to individual fields of existing feature classes.
- In the Contents pane, click the Vienna City Trails layer to select it.
- On the ribbon, click the Edit tab. In the Selection group, click the Select button.
- On the map, click any trail feature.
The trail you click is selected, causing it to be highlighted blue.
- On the Edit tab, in the Selection group, click Attributes.
The Attributes pane appears. In this pane, you can edit the attribute field values for the selected trail.
- In the Attributes pane, click the value for Trail Length field.
The field highlights, indicating that you can update its value by typing a new value. Currently, you can update the Trail Length field value with any value. There is no mechanism to verify or limit what values are added. You will address this problem later.
You will not make a change to the Trail Length field value at this time.
- Scroll to the bottom of the Attributes pane. For the Trail Rating field, click the Choose Symbol Class button.
A list of descriptions appears, allowing you update the current subtype.
You cannot type a custom Trail Rating value. Instead, you must select one of the valid values from the list, maintaining data consistency. This functionality is a major reason for using subtypes.
You won't change the Trail Rating field value at this time.
- Close the Attributes pane.
- On the Edit tab, in the Selection group, click Clear.
- Save the project.
You've successfully updated the Vienna City Trails feature class in the geodatabase by applying a subtype field to the city trails.
Create domains
Next, you'll add domains to a geodatabase and apply them to individual fields of existing feature classes.
Create domains using a view
Domains are similar to subtypes in that they enforce data integrity by offering a list of valid values to choose from while populating attribute fields. Unlike subtypes, however, domains are used to regulate the values permitted in any particular attribute field for a table, feature class, or subtype.
Domains are stored in a geodatabase and can be applied to multiple feature classes and tables within the geodatabase. Depending on your requirements, attribute domains are applied either as range domains or coded value domains. Range domains define a field's minimum and maximum values. They can be used in short, long, float, double, and date attribute fields. Coded value domains specify a valid set of values for an attribute, giving both the allowed actual value and a more easily interpreted description of what the code represents.
- In the Contents pane, select Vienna City Trails.
- On the ribbon, click the Data tab. In the Data Design group, click Domains.
The Domains view appears. In this view, you can review existing domains, edit their properties and values, and create domains.
Next, you'll create a domain.
- In the Domains view, double-click the empty cell for Domain Name and type Accessibility. For Description, type Trail accessibility.
- For Field Type, choose Short. For Domain Type, confirm that Coded Value Domain is selected.
When the domain type is a coded value domain, an additional table at the end of the row is used to input domain codes and descriptions.
- For Code, type 1. For Description, type Unpaved and press Enter.
Once you add one code and description, another row is added.
- Add Code and Description values using the following table:
Code Description 1
Unpaved
2
Paved
3
Partially Paved
4
Stroller Friendly
5
Wheelchair Friendly
There are now five codes and descriptions.
- On the ribbon, on the Domains tab, in the Manage Edits group, click Save.
- On the Domains tab, in the Edits group, click New.
A new domain is added to the view.
- For the new domain, enter the following information:
- For Domain Name, type MaxTrailDuration.
- For Description type Maximum Trail Duration.
- For Field Type, choose Short.
- For Domain Type, choose Range Domain.
When a range domain is selected, the additional table provides for the input of minimum and maximum values to limit or constrain the numerical values that can be used in the field.
- For Minimum, type 3. For Maximum, type 7.
- On the ribbon, on the Domains tab, in the Manage Edits group, click Save.
- Create a range domain for minimum trail duration using the following parameters:
- For Domain Name, type MinTrailDuration.
- For Description, type Minimum Trail Duration.
- For Field Type, choose Short.
- For Domain Type, choose Range Domain.
- For Minimum Value, type 1.
- For Maximum Value, type 2.
- On the ribbon, on the Domains tab, in the Manage Edits group, click Save.
The Domains view now has three domains.
- Add three more range domains using the following parameters:
Domain Name Description Field Type Domain Type Minimum Value Maximum Value ShortTrailLength
Average kilometer length of a short trail
Short
Range Domain
2
9
MediumTrailLength
Average kilometer length of a medium trail
Short
Range Domain
10
13
LongTrailLength
Average kilometer length of a long trail
Short
Range Domain
14
15
You've created a total of six domains.
- On the ribbon, on the Domains tab, in the Manage Edits group, click Save.
- Close the Domains view.
Create domains using a tool
Creating coded value domains with many codes and descriptions can be a time consuming and laborious process. To speed up the process, you'll use a geoprocessing tool to create additional coded value domains from existing tables in the geodatabase.
The Table To Domain geoprocessing tool is used to create or update a coded value domain with values from a table.
Note:
Attribute domains are a property of the geodatabase and can be shared across feature classes, tables, and subtypes in a geodatabase. They provide an effective way of enforcing data integrity by limiting what can be inserted into a field using the codes in a coded value domain or the minimum or maximum range in a range domain.
- In the Catalog pane, expand the Maps folder. Right-click ReferenceMap and choose Open.
A map view appears. This map contains several standalone tables.
- In the Contents pane, right-click the Duration table and choose Open.
The table contains values that can be used in a Trail Duration domain.
Next, you'll use a geoprocessing tool to create a domain and assign values to it from this table.
- Close the Duration table.
- On the ribbon, on the Analysis tab, in the Geoprocessing group, click Tools.
The Geoprocessing pane appears.
- In the Geoprocessing pane, search for and open the Table To Domain tool.
- In the Table To Domain pane, set the following parameters:
- For Input Table, choose Duration.
- For Code Field, choose TrailDuration.
- For Description Field, choose TrailDurationTimes.
- For Input Workspace, browse to the project's Databases folder and choose vienna.gdb.
- For Domain Name, accept the default name TrailDuration.
- For Domain Description, type Time needed to complete trail.
- Click Run.
The tool runs. When it finishes, no changes are made to the map. You can confirm that the tool ran successfully by checking the Domains view.
- In the Contents pane, select Vienna City Trails. On the ribbon, click the Data tab. In the Data Design group, click Domains.
The Domains view appears. The TrailDuration domain has been successfully added.
Note:
If you do not see the TrailDuration domain, try closing the Domains view and reopening it.
- Using the Table To Domain geoprocessing tool, create four additional coded value domains using the parameters in the following table:
Input Table Code Field Description Field Input Workspace Domain Name Domain Description Scenery
SceneryCode
SceneryDescription
vienna.gdb
Scenery
Various types of scenery along trail
TrailLength
LengthCode
LengthDescription
vienna.gdb
TrailLength
Trail distance in kilometers
ElevationChange
ElevationCode
ElevationDescription
vienna.gdb
ElevationChange
Rate of change in elevation along trail
TrailType
TrailTypeCode
TrailTypeDescription
vienna.gdb
TrailType
Description of trail types
- Close and reopen the Domains view.
The Scenery, TrailLength, ElevationChange, and TrailType domains have been successfully added.
- Close the Domains view and save the project.
Assign domains to fields
If the features in a table have been grouped into subtypes, different attribute domains can be assigned to each of the subtypes. However, when a domain is associated with an attribute field, only the values within that domain are valid for the field; the field will not accept a value that is not in that domain.
- In the Contents pane, right-click the Vienna City Trails layer and choose Attribute table.
The Trail Accessibility and Average Trail Elevation fields are populated with non-descriptive values that are not very useful.
You'll assign domains to these fields and review how domains affect the table.
- On the ribbon, on the Data tab, in the Data Design group, click Subtypes.
- If necessary, expand the Subtypes view so you can see the entire table without scrolling.
- For the Easy subtype, locate the Accessibility field. Double-click the Domain cell and choose Accessibility.
- For the Moderate, Strenuous, and Unrated subtypes, assign the Accessibility domain to the Accessibility field.
- On the ribbon, on the Subtypes tab, in the Changes group, click Save.
Note:
A benefit of applying a subtype to a field in a table is that you can apply different domains for each subtype for the same attribute field.
- For the Length field, set the following domains:
- For the Easy subtype, set Domain to ShortTrailLength.
- For the Moderate subtype, set Domain to MediumTrailLength.
- For the Strenuous subtype, set Domain to LongTrailLength.
- For the Unrated subtype, set Domain to ShortTrailLength.
- Save the subtypes.
- For the Easy, Moderate, Strenuous, and Unrated subtypes, assign the following additional domains:
Field Name Domain MinDuration
MinTrailDuration
MaxDuration
MaxTrailDuration
Scenery
Scenery
Elevation
ElevationChange
TrailType
TrailType
- Save the subtypes and close the Subtypes view.
- If necessary, open the attribute table for the Vienna City Trails layer.
The Trail Accessibility, Highlighted Scenery, and Average Trail Elevation fields are now populated with descriptive values derived from the domain descriptions.
The Type of trail field remains empty, as no values have been entered into to this field. This field does have a domain applied, but without values added and with no default set, the domain cannot be validated.
- Close the attribute table and save the project.
Update a trail feature
Next, you'll update a trail feature and explore the effect of domains while editing.
Using domains helps ensure data integrity by limiting the choice of values for a particular field. Validation for coded value domains is accomplished by restricting field values found in drop-down lists. Range domains are automatically validated during editing. You'll update a trail feature and use a code value and range domain.
- Click the Source tab to return to the original map view.
- In the Contents pane, click the Vienna City Trails layer to select it.
- On the ribbon, click the Edit tab. In the Selections group, click the Select button.
- On the map, click any trail feature to select it.
- On the Edit tab, in the Selections group, click Attributes.
The Attributes pane appears. You used this pane previously in the tutorial to edit field values for a selected trail. This time, the values you can enter and the choices you can apply to fields are affected by the domains applied to the fields.
- In the Attributes pane, click the Type of trail value.
You cannot type your own trail type. Instead, you must choose one of the predefined types.
- For Type of trail, choose any type that is different from the original trail type.
- Experiment with changing the values for Trail Accessibility and Highlighted Scenery.
Previously, you assigned a range domain to the Trail Length field that restricts length based on the different subtypes as shown in the following table:
Subtype Domain Name Minimum Value Maximum Value Easy
ShortTrailLength
2
9
Moderate
MediumTrailLength
10
13
Strenuous
LongTrailLength
14
15
- In the Attributes pane, for Trail Length, type 99 and press Enter.
The field highlights in red, indicating that the trail length is not within the range allowed for a moderate trail rating subtype. In addition, the Attributes pane displays a warning that the medium trail length allowed must be between 10 and 13.
- Update the Trail Length value to 11 and press Enter.
The value falls within the allowable range and the warning message no longer appears.
Your current changes are not committed back to the geodatabase until you save your edits.
- Close the Attributes pane.
A message appears, informing you that there are uncommitted attribute edits. You only made changes to experiment with editing, so you'll discard the changes.
- Click Discard and clear the selection.
- On the ribbon, click the Map tab. In the Navigate group, click the Explore button to deactivate the Select tool.
- Save the project.
You've added domains and applied them to fields of a feature class. You also edited a feature with domains and subtypes. Next, you'll publish and use your feature service.
Publish a feature service
Next, you'll publish the Vienna City Trails layer and verify access to data validation while editing in a web map.
Share a web layer
Before you can share features that support subtypes and domains in a web app, you must ensure that all editable layers have a feature template configured. A feature template is a predefined collection of construction tools that is used to create features on the layer.
Feature templates are a property of a layer and are managed and maintained in the ArcGIS Pro project. If the layer is shared as a layer file, layer package, or web layer, the template properties are also shared. You'll create feature templates for the Vienna City Trails layer before publishing the layer.
- On the Edit tab, in the lower corner of the Features group, click the Manage Templates button.
- In the Manage Templates pane, right-click the Vienna City Trails layer and click Create all templates.
Feature templates are generated and added to the templates box for each associated layer subtype. Each template is named to match the subtype description. You can set different default values and apply different edit strategies and edit tools to be used to update or create features using the templates.
You're ready to publish the layer. First, you'll remove the other layers from the map and save the project.
- In the Contents pane, remove all layers (even the basemap layers) except the Vienna City Trails layer.
Tip:
Remove a layer by right-clicking the layer and choosing Remove.
- Save the project.
- On the ribbon, click the Share tab. In the Share As group, click the Web Layer drop-down menu and choose Publish Web Layer.
The Share As Web Layer pane appears.
- In the Share As Web Layer pane, update the following parameters:
- For Name, type Vienna City Trails followed by your name or initials.
- For Summary, type Hiking trail data with attribute validation applied.
- For Tags, keep the default list of tags.
- For Layer Type, confirm that Feature is selected.
Note:
If you're an ArcGIS Enterprise user, under Data and Layer Type, for Copy all data, choose Feature.
- For Location, type Vienna Trails. For Share with, check the box for Everyone.
Before you publish, you'll analyze the layer for any errors that would prevent publishing.
- In the Share As Web Layer pane, click Analyze.
A warning may appear related to the assignment of unique numeric IDs for sharing web layers.
- If the warning appears, double-click the warning. In the Map Properties window, check Allow assignment of unique numeric IDs for sharing web layers and click OK.
- If necessary, in the Share As Web Layer pane, click Analyze. Confirm that there are no errors found.
Note:
If you encounter an error other than the unique numeric IDs error, read the error's description and resolve it before continuing.
- Click Publish.
- After publishing is finished, click Manage the web layer.
A browser opens to the item page for your Vienna City Trails web layer.
Enable editing
Next, you'll enable editing for your web layer.
- If necessary, on the item page, sign in to your ArcGIS organizational account.
- On the ribbon, click Settings.
- Under General, for Public Data Collection, check the box for Approve this layer to be shared with the public when editing is enabled.
- Next to General, click Save.
- Under Feature Layer (hosted), for Editing, check Enable editing.
- Next to Feature Layer (hosted), click Save.
You have changed settings on the published layer to allow enable editing and to allow sharing while editing is enabled.
Edit features in a web map
Now that editing is enabled for your layer, you'll add it to a web map and edit some features.
- On the ribbon, click Overview.
- Click Open in Map Viewer.
The map opens in Map Viewer.
Note:
Depending on your organizational and user settings, you may have opened Map Viewer Classic. ArcGIS Online offers two map viewers for viewing, using, and creating maps. For more information on the map viewers available and which to use, please see this FAQ.
- If necessary, in the pop-up window, click Open in Map Viewer or on the ribbon, click Open in Map Viewer.
Map Viewer opens.
- On the Contents (dark) toolbar, click Basemap. In the Basemap pane, choose Dark Gray Canvas.
The basemap updates on your map.
- On the Contents toolbar, click Layers.
The Layers pane appears.
- On the Layers pane, confirm that the Vienna City Trails layer is selected. On the Settings (light) toolbar, click Edit.
Tip:
If the Edit tool is not visible, click More to see more tools on the Settings toolbar and click Edit.
The Editor pane appears.
- In the Editor pane, under Edit features, click Select.
- Click any trail on the map.
The trail is selected. The Editor pane changes to the Edit feature pane, showing all the attributes, subtypes, and domains that have been applied to the source layer, ensuring that new trails collected and edits made to trails in a web map or app will remain valid.
- In the Edit feature pane, for Type of trail, choose Hiking trail.
- Click Trail Length, type 99, and press Enter.
The value returns to the original value.
- For Trail Length, type 10 and press Enter.
Note:
The edits you make to the feature layer in Map Viewer are automatically saved to the layer. When you add, delete, or edit a feature or attribute and realize you made a mistake, you can click Delete to delete your edit.
- At the bottom of the Edit feature pane, click Update.
The pane changes to the Select feature pane. You'll return to the Editor pane and create a new trail feature.
- In the Select feature pane. In the Editor pane, under Create features, click Moderate to add a new feature.
- On the map, click anywhere to start adding vertices for a new trail feature and double-click when you complete the new trail.
- Click the new feature to display its vertices.
You can click and move vertices as needed to update and change the route the trail follows.
- To commit your updates, click a location on the map away from the feature you created.
The Create features pane displays the attributes for the new trail you created.
- In the Create features window, update your new trail attributes by typing a name and selecting attribute values from the various lists applied to fields. When you're finished, click Create.
- Optionally, save the web map.
In this tutorial, you investigated how a local Vienna tourist agency can use attribute validation techniques in a geodatabase to build and maintain a hiking trail layer that provides clients with trail information and offers them an opportunity to contribute and suggest new trails. Using subtypes and domains, the agency can ensure data consistency, reduce redundancy, and build efficient web maps and downloadable apps.
Subtypes and domains are powerful tools for ensuring data integrity and the efficiency of a geodatabase, and you may find them useful on many of your datasets. However, they are most useful when working with large datasets. Errors can occur in any dataset, but once your feature count exceeds a few hundred, it becomes difficult to manually sort through and ensure that you don't have any typos or other errors. If multiple people will be editing the same feature class, it increases the opportunity for errors.
Assigning domains to attribute fields creates restrictions on the allowable values, so you can't enter misspelled words or numeric values outside of a defined range. Domains help to ensure that your data remains clean and accurate. Subtypes can also apply restrictions on allowable attribute values but only on one integer field per feature class. Subtypes true usefulness is classifying your data to make it perform faster by storing information in coded integers instead of long strings.
On your own, consider revisiting the Rundumadum Trail Stages layer and assign geodatabase domains to the various attribute fields associated with the 24 stages of the trail.
You can find more tutorials in the tutorial gallery.