GeometryObjectException thrown when create Polyline with an EllipticArcSegment

518
2
05-11-2022 03:11 PM
ChangmingDu
New Contributor

I used EllipticArcBuilder.CreateEllipticArcSegment() to create a segment, and passed the segment to  PolylineBuilder.CreatePolyline() function to generate a polyline. It gave me an error. But it worked when I use arcgis pro 2.8. It happens after I update my Arcgis pro to 2.9.3. Any suggest is appreciated.

ChangmingDu_0-1652306851248.png

 

0 Kudos
2 Replies
sjones_esriau
Esri Contributor

The following still works for me with Pro 2.9.3

      //build a search circle geometry
      var cent = new Coordinate2D(mapPoint);
      var searchGeom = EllipticArcBuilder.CreateEllipticArcSegment(cent, searchRadius, esriArcOrientation.esriArcClockwise, MapView.Active.Map.SpatialReference);
      var searchPB = new PolygonBuilder(new[] { searchGeom });
      return searchPB.ToGeometry();

 

which CreateEllipticArcSegment overload are you using?

0 Kudos
ChangmingDu
New Contributor

@sjones_esriau Thanks for your reply.  I put my simple code below. Do I make anything wrong?

var arc2 = EllipticArcBuilder.CreateEllipticArcSegment(new Coordinate2D(-3924039.8966005351, 3789702.0418286407), -4.484, 6.280, 0, 16780, 1);
var poly2 = PolylineBuilder.CreatePolyline(arc2);

 

0 Kudos