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)
-
Update attributes of features
-
Add or delete feature attachments
Feature layers in your map that support editing expose editing functionality through the underlying FeatureTable
.
Basic editing workflow
Editing in Maps SDK Native Apps can involve a variety of processes, tools, and workflows. The topics in this section describe key areas of functionality and some concepts to consider as you plan and implement editing functionality for your app
-
Editing patterns describes the editing patterns available to you. Your use case may dictate how you implement editing in your app. For example, an app that is fully disconnected from the network will require a different pattern than an app that is always connected.
-
Prepare data outlines some considerations before implementing editing in your app. Based on your requirements, you need to design and create datasets of the appropriate format, with the necessary geometry type and attribute schema, that support the required editing behavior. These are not development tasks but are necessary to support the editing workflow you want to provide.
-
Edit features covers the foundational edit operations: add, update, and delete which are key for any editing workflow. The ability to undo or roll back changes is also explored.
-
Edit geometry shows how to use the
GeometryEditor
to edit the shape/location of a feature. It also explains different ways to create new geometry. -
Persist edits considers the methods available for storing local edits to the service feature database (online pattern) or a sync-enabled geodatabase (offline pattern) in a feature service.
Edit using feature forms
A feature form enables your users to edit feature attribute values and feature attachments using a set of preconfigured controls. The form guides users to editable fields, restricts the values that can be entered, and validates user input.
A layer or feature table of that implements the FeatureFormSource
has a default feature form containing all editable fields in the layer listed in default order. For a more customized user experience, the web map author can define a feature form for the layer that includes a subset of the total fields, presents them in a different order, and groups conceptually-related fields together.
Use the FeatureForm component in the ArcGIS Maps SDK for Kotlin Toolkit to display and work with feature forms in your app. The following topics discuss feature forms, the feature form API, and the Toolkit component.
-
Overview lists the benefits of using a feature form for user input and describes the feature form definition that can be specified in the web map.
-
Edit using toolkit describes how to use the FeatureForm component in the ArcGIS Maps SDK for Kotlin toolkit, which displays the feature form UI, handles user input from the feature form, streamlines handling validation errors, and saves or discards edits.
-
Editing capabilities identifies the
FeatureForm
API classes that provide access to the elements of a feature form.
Advanced editing capabilities
The data you are editing might have been enhanced with such advanced data design as attribute rules, contingent rules, and related features. These enhancements are defined in ArcGIS Online, ArcGIS Server, or ArcGIS Pro, but are consumed by the ArcGIS Maps SDK for Kotlin API. In addition, some geodatabases can use branch versioning to support multiple editors and transactions to promote the data consistency of local commit.
-
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.
-
Contingent values are used to make allowed values in one attribute dependent upon the current values of other fields. They are built on top of attribute domains and add a further level of data integrity for user input.
-
Related 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.
-
Branch versioned data 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. Branch versioning applies to
ServiceGeodatabase
s only. -
Geodatabase transactions allow a set of edits to be committed or rolled back as a single batch. They apply only to sync-enabled mobile
Geodatabase
s.