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 editing workflows and operations. Information on how to design an editing application is provided, along with the different types of editing that can be performed. The ArcGIS Server components and layer configuration required to support editing are also discussed. More detailed information about creating new features, editing existing geometries, and updating feature attributes is included later in this topic.

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 uploading or editing data as they travel, remote workers editing data offline and uploading data at the end of the day, or the general public adding or commenting on data via your Android app.

Adding, deleting, and updating features in your feature service can be performed, and this includes all 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 (for example, wireless LAN connections), the number 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 users 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 users already know and 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 that 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 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 click or via location information from the Android device's GPS. It is also possible to create more complex feature geometry 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 is discussed in more detail in the Creating new features topic. Whatever features you are creating, you must ensure that they conform to the layer's specifications in terms of geometry type, accuracy, and topology rules. All of this information can be gleaned programmatically using the ArcGISFeatureLayer object methods.

Editing existing geometries

This comprises 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 including 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) may be important depending on what tools you provide. This is discussed in more detail in the Editing existing geometries topic.

Editing attributes

Editing attributes means you do not need to consider editing the feature's geometry. To keep the application simple, 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 device's time and 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 (for example, date picker, spinner, or text editor), soft keyboard appearances, data validation, and programming logic (for example, parsing a string to numbers). This 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-based services are configured partially via a map service definition (.msd) or .mxd 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 layer's 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, you 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 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 subtypes to provide default values and default renderers.

1/24/2013