What is editing?

This topic provides the background for editing data with the ArcGIS API for Android. It describes what is possible and explains some of the edit workflows and operations. Information on how to design an editing application is provided along with the different types of editing which can be achieved. The ArcGIS Server components and layer configuration required to support editing are also discussed. More detailed topics are included later in this topic about Creating new features, Editing existing geometries and Updating feature attributes.

What is possible?

With the ArcGIS API for Android it is possible to edit your spatial data held in a geodatabase remotely via ArcGIS Server. This could be for field workers to upload or edit data as they travel, remote workers editing data offline and synchronizing their new data at the end of the day or the general public adding or commenting on data via your Android app.

The ability to add, delete and update features in your Feature Service can be performed and this includes all of the supported geometry, renderer and attribute types available in the Feature Service specification.

Whatever the scenario, the ArcGIS API for Android and the core Android API can help you achieve your goals.

The editing workflow

The editing workflow describes how and when the data is going to be edited by the user, and how and when the application submits the edits to the server. To get this right for your application, you will need to know where the application is going to be used as this will determine the availability and reliability of network connections. This is an important consideration in determining the editing workflow, as retrieving and submitting data with the ArcGIS API for Android requires network communication to ArcGIS Server.

Over the air editing

The currently supported workflow for editing with the ArcGIS API for Android is to send and receive edits as they are completed via network calls to ArcGIS Server. If users are always going to be in locations with consistent high speed network access (e.g. wireless LAN connections), then worrying about the amount of these network calls is not a big issue. However, in areas of low bandwidth or intermittent service you will need to ensure your application minimizes network traffic and handles failed edit requests gracefully without the user losing their work.

User centric design

Whatever your workflow, you should develop the application with the type of user in mind, so they find it easy and satisfying to use. This includes focusing on what the user already knows, how they will be capturing their data and reducing any unnecessary steps from their point of view. This ensures that data is captured efficiently and will also reduce training and future maintenance costs.

What types of editing are there?

There are many types of scenarios which can be considered editing. This topic focuses on creating new features, editing existing features and editing attributes. A brief description of each can be found below, with additional links to more detailed topics.

New feature creation

This involves adding new features to a layer in the map. This could be through a user placing a point location on the map with a map click, or via location information from the android device's GPS. More complex feature geometry creation is also possible including polygons, polylines, envelopes and multipoints. You might want to consider using geodatabase subtypes or feature templates to help users add information quickly, as these include default symbols and attributes for new features. This topic is discussed in more detail in the Creating New Features topic. Whatever features you are creating you must ensure that they conform to the layers specifications in terms of geometry type, accuracy and topology rules, all of this information can be gleaned programmatically using the ArcGISFeatureLayer objects methods.

Editing Existing geometries

This comprises of reshaping or moving existing features on the map. This is probably the most involved editing scenario because geometry editing tools are complex in terms of what they need to do and how this is presented to the user. The tools always need to maintain the integrity of the data layer to include conforming to the correct geometry type, accuracy and topology rules. However, the complexity depends on what tools you decide to provide for your users. Some simple functions include vertex editing, feature moving and feature deletion. More complex functions include geometry operations like buffers, clips, intersects and unions. The use of the Geometry Engine and Geometry Service (discussed below) maybe important depending on what tools you provide. This topic is discussed in more detail in the Editing existing geometries topic.

Editing Attributes

Editing attributes means you do not need to consider editing the features geometry. To keep the application simple then you should only display necessary fields and try to provide lists or choices of values to make it quick for the user. You can programmatically perform automatic editing of some fields using the Android devices time, date or even a reverse geocoded location. You should consider the data type of the field you are editing in order to display appropriate editing Views (e.g. Date picker, Spinner or EditText), Soft Keyboard appearances (number of text), data validation and programming logic (e.g. parsing string to numbers). This topic is discussed in more detail in the Editing attributes topic.

What do i need?

There are a few things you will need to set up and understand before you can start writing your ArcGIS for Android application, these are described below.

Attachments can also be added to features using the ArcGISFeatureLayer.addAttachment() method

ArcGIS Server Feature Service:

Editing for the ArcGIS API for Android is enabled via ArcGIS Server Feature Services. These REST base services are configured partially via an Map Service Definition (Mxd or Msd document) and partially by the Geodatabase design, see the ArcGIS Desktop Help for further information on how to create these services. Feature Services can be made available to the ArcGIS API for Android via in-house or public ArcGIS Server instances or from ArcGIS.com.

The configuration of these services is very important as they define what data is available for editing, what fields can be edited and what the default values might be. Other important aspects to consider for any map are the layers symbology, scale thresholds and metadata, for further information on authoring map and feature services see the ArcGIS Server Help.

Geometry Engine and Geometry Service:

When editing geographic features, it may be required to perform geometric operations like split, cut or simplify or to do spatial query operations such as nearest, touches or contains. The ArcGIS API for Android provides a local Geometry Engine for this (see the com.esri.core.geometry package). This engine provides nearly all of the capabilities that the comparable ArcGIS Server Geometry Service provides. You can use either in your application.

What else might help me edit features

Other things you might want to consider are the use of geodatabase subtypes in your geodatabase which can provide default values and domains to help you categorize your data. Feature templates configured at the Feature Service level can also be used with or without feature subypes to provide default values and default renderers.