This document is archived and information here might be outdated.  Recommended version.


IVectorization2.ShapeRecognition Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (ArcScan)  

IVectorization2.ShapeRecognition Method

Generates a geometry for the given fromPt.

[Visual Basic .NET]
Public Function ShapeRecognition ( _
    ByVal fromPt As IPoint, _
    ByVal tolerance As Double _
) As IPolyline
[C#]
public IPolyline ShapeRecognition (
    IPoint fromPt,
    double tolerance
);

Product Availability

Available with ArcGIS Desktop. Requires ArcScan Extension.

Remarks

This method is called by the Shape Recognition tool on the ArcScan toolbar.

It recognizes a raster solid which is selected by fromPt as a square, rectangle, circle, ellipse, or orthogonal figure and generates a vector. The vector is returned as IPolyline.

Shape recognition type can be set using IVectorizationBatchProperties2::ShapeRecognitionSearchFlags.

[C#]

The following code shows an example of this method in C#.

//You can get app from ICommand :: OnCreate() hook parameter
IVectorization2 vectorization2=app.FindExtensionByName("ESRI ArcScan Tools") as IVectorization2;

ESRI.ArcGIS.Geometry.IPoint fromPoint=new ESRI.ArcGIS.Geometry.Point();
fromPoint.PutCoords(3345145.328, -3700127.032);

ESRI.ArcGIS.Geometry.IPolyline polyline=vectorization2.ShapeRecognition(fromPoint, 0.1);

 

See Also

IVectorization2 Interface