Customizing the geometry editing workflow

The application provides a set of geometry editing methods to modify an existing feature' geometry. The geometry workflow can be started from the edit attributes page of an existing feature. The following geometry methods are provided in the application:

Each geometry editing method consists of one or more map pages, for example, the method for replacing a portion starts with a map page for specifying a start point using a map or Global Positioning System (GPS) and the start point is displayed using a green flag. Then the application presents another page for collecting the new geometry portion, with built-in geometry collection methods provides as in the Feature Collection task. Once the new portion is collected, you specify an end point (a red flag on the map). The Geometry Edit Complete map page shows the new geometry highlighted on the map, and you can click the geometry editing tool widget to continue the editing with different methods or go back to the Edit Attributes page to save it. For a polygon feature, there is an additional page for specifying which side of the polygon you want to replace or delete.

The following graphic shows the replace geometry portion workflow for a polygon feature:

Geometry editing workflow

All of the geometry edit methods are managed by GeometryEditProcess in the application framework. GeometryEditProcess raises events when the workflow is started and completed: GeometryEditProcessStarted and GeometryEditProcessCompleted. These two events provide a reference to the feature being edited in their event arguments, which can be leveraged in extensions.

Notification when geometry editing begins and ends

GeometryEditMethod provides two events that will be raised—GeometryEditMethodStarting when a geometry editing method starts and GeometryEditMethodCompleted when a geometry editing method is completed. The feature being edited can be accessed from the events' arguments.

Adding and removing geometry editing methods

The geometry editing workflow provides a set of basic geometry editing methods commonly used for field data collection (as shown in the previous graphic). To plug in your own geometry editing method, implement it by subclassing GeometryEditMethod and adding it to the geometry editing method page. To add a geometry editing method, listen to the GeometryEditMethodPage.CreatingGeometryEditMethods event.

In your geometry editing method, you can start the geometry editing workflow in the override function OnStartGeometryEditMethod. The feature being edited is available from GeometryEditMethod as a public property. When your editing workflow is done, call NotifyGeometryEditCompleted(), and the application will proceed to geometry edit a complete map page. You can see the new geometry highlighted on the map and continue to edit the geometry by clicking the geometry edit tool widget. To cancel your editing workflow, call the NotifyGeometryCancelled() function, and the application will go back to the edit attributes page.

See the CollectGeometryExtensions sample for more details.

Where to get the sample

The CollectGeometryExtension sample is available for download from ArcGIS.com.

1/7/2015