Curve conversion add-in


Purpose
This sample shows how to convert curves imported from a shapefile or coverage into true curves supported by the geodatabase.
 
The CurveConversion command works on a selected set of features, calculating an attribute value on those that are updated (if specified). All selected features should be from a single layer, which can be part of a topology. If the layer of the selected features is part of a topology, the edges beneath the features are updated to ensure that all other features sharing the geometry (that is, polygons) are also modified.
 
A three-point curve is calculated for each selected polyline based on the start point, midpoint (calculated by determining the point in the middle of the polyline), and end point. An optional tolerance can be specified so that the fit of the curve can be tested against the original geometry. If any vertex from the original geometry is outside the tolerance, the feature will not be updated.
 
Shapefiles do not support true curves. Do not run this command against features of the shapefile format.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open and compile the project in Visual Studio.
  2. Start ArcMap and load a line feature class containing features that approximate curves.
  3. Click the Customize menu and click Add-In Manager. The Add-In Manager dialog box appears.
  4. Make sure that there is a CurveConversion add-in available.
  5. Click Customize. The Customize dialog box appears.
  6. If the add-in was not on the Add-In Manager dialog box, browse to the location of the add-in and select the .esriAddIn file located in the projects bin\Debug folder.
  7. Under the Commands tab on the Customize dialog box, select the Add-In Controls category, select the Curve Conversion command, then drag it onto a toolbar.
  8. Close the Customize dialog box.
  9. Start an edit session and select one or more polyline features. The polyline features you select should approximate curves (that is, import them from a coordinate geometry [COGO] coverage).
  10. Click the Curve Conversion command and complete the dialog box that opens. The tolerance and update field are optional parameters.
  11. Click OK. A progress bar appears at the bottom left of your ArcMap session.

Additional information

When dealing with features in a topology, the CurveConversion command can run faster if you build the topology cache for the area, including your selected features first. This is the quickest way to run the tool if a large percentage of your features are curves. If you only have a small number of curves, it might be quicker to allow the command to calculate the cache for each feature as it progresses. To determine which features were updated during the conversion, provide a field to be updated. The field you select will have its value calculated when a feature's geometry is updated with a curve.


CurveConversionCmd.cs Code file containing the command to open the dockable window.
CurveConversionDockWin.cs Code file containing the implementation of the dockable window.
Download the C# files
CurveConversionCmd.vb Code file containing the command to open the dockable window.
CurveConversionDockWin.vb Code file containing the implementation of the dockable window.
Download the VB.NET files

Download the files for all languages




Additional Requirements
  • Edit session containing line and curve data.

Development licensing Deployment licensing
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo