This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > ArcScan > ESRI.ArcGIS.ArcScan > Interfaces > IV > IVectorization2 Interface > IVectorization2.ShapeRecognition Method (ArcObjects .NET 10.4 SDK) |
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 );
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.
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);