Edit features

Editing geographic data is the process of adding, updating, or deleting features and related data on layers in a map. Each layer is connected to a data source that defines and stores the features. Fine grained control over editing operations are available by using the editing API, allowing you to do the following:

  • Add and delete features

  • Update geometry (for example, moving or reshaping a feature) and attributes of features

  • Add, update or delete feature attachments

Feature layers inside your map's operational layers collection provide the basis for editing. A feature layer stores and edits its data using a FeatureTable.

Editing features supports a number of patterns:

  • Online feature service editing: A ServiceFeatureTable is created from the service, edits are made to the table, and the changes are applied back to the service when the edit operation is finished. This pattern is suitable for multi-user editing scenarios in a connected environment.

  • Offline feature service editing: A GeodatabaseFeatureTable is created from a sync-enabled feature service before going offline. Tables are retrieved from the geodatabase while offline, edits are made, and changes are optionally synced back to the service when the device is back online. This pattern is suitable for multi-user workflows where users will be disconnected from the internet. See Offline maps, scenes, and data for more information about offline workflows.

  • Feature collection editing: A FeatureCollectionTable contains features from an ArcGIS web map or a feature collection portal item. Edits are made and changes are saved to the ArcGIS web map or feature collection portal item. This is a suitable workflow for sharing static data to lots of clients but should not be used to edit data across a number of clients or to share data that changes frequently.

  • Offline file-based editing: Edits can be made to features from a GeoPackage file (.gpkg) that supports the OGC GeoPackage specification. Such a file is stand-alone and is not backed by a feature service; it is fully offline. If your workflow includes sharing edits online and managing edits across many users, it is recommended that you use online feature service editing.

The topics in this section are designed to help you understand the editing process using the online and offline feature service patterns as examples.

  1. Prepare data examines things to consider before you start building your editing applications. For example, there are situations where you might be required to create a feature service. Although this is not a development task, useful resources are provided to help you create your own feature services that in turn can be consumed and used in your application.

  2. Perform edits covers the foundational edit operations: add, update, and delete that are key for any of the previously described editing patterns. The ability to undo or roll back changes is also explored.

  3. Apply edits (online) captures the online editing pattern and shows you how to apply edits made locally to the connected feature service. This topic also explores and compares the service geodatabase to the service feature table, to equip you to work with the right one when applying edits back to the service.

  4. Synchronize edits (offline) links to resources describing the offline editing pattern where changes made locally in the geodatabase feature table can be synchronized to the feature service once a connection to the internet is re-established.

In addition, the editing process can be enhanced in a number of ways:

  • Attribute rules can automatically populate attributes, restrict invalid edits during edit operations, and perform data validation checks on existing features to help improve data integrity for geodatabase datasets.
  • Branch versioning provides support for isolating edits between multiple users making changes to a feature service. A quality assurance and control workflow can be used to audit the changes made—with only approved changes making it into a production database where key stakeholders view the data.

  • Contingent values allow you to make values in one attribute dependent upon values in another field. For example, a value for one attribute can help constrain what values are valid in another independent attribute. This can help speed up attribute entry in your applications.

  • Relate features allow you to relate a feature in one table to a feature in another table. For example, you might want a user to be able to view building inspections from an inspection table and view general building information (such as common name, year built, or tenants) from a buildings table for the same set of buildings.

  • Edit attribute values dives into attribute editing further looking at what feature forms are, the benefits of using them, and a deeper dive into the API.

Samples

Edit features with feature-linked annotation

Edit and sync features

Edit with branch versioning

Edit feature attachments

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.