<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem with merging features created using ICircularArc in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-with-merging-features-created-using/m-p/412096#M11057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need a tool to creat buffer around a point, which is a typicall round buffer, but with one side cut depending on some parameters. Looks like ICircularArc is the perfect class. I get the tool to creat all the buffers as I need and output to either a shapefile or database. However, as a last step I need to merge all the individual buffers to creat a single feature, for which a manual operation is convenient enough. But as soon as I merge them, everything disappears. Doesn't matter if the output is in a GDB or shapefile. Anyone has idea what is going on and what I can do to fix the problem? I'm including the code snippet I used for creating the individual buffers, and a shapefile which if you merge all features, everything will disappear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly, if the geometries of all features are somewhat touched before merging, for example, all polygons selected and cut, merging would work as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;... IPoint point = feature.Shape as IPoint;&amp;nbsp; if (!CompareSpatialRefs(spatialReferenceOut,spatialReferenceSiren)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Project(spatialReferenceOut); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICircularArc circArc = new CircularArcClass(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ILine2 lineClosePolygon = new LineClass(); ISegmentCollection ring1 = new RingClass(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ring1.AddSegment(circArc as ISegment, ref missing, ref missing); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ring1.AddSegment(lineClosePolygon as ISegment, ref missing, ref missing);&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IPolygon4 polygon = new PolygonClass(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon.SpatialReference = spatialReferenceOut;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGeometryCollection geometryCollection = polygon as IGeometryCollection; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryCollection.AddGeometry(ring1 as IGeometry, ref missing, ref missing); circArc.PutCoordsByAngle(point, start_angle, central_angle_span, radius * HorizontalUnit_FT2OutputUnit); lineClosePolygon.PutCoords(circArc.ToPoint, circArc.FromPoint); geometryCollection.GeometriesChanged(); outputFeatureBuffer.Shape = polygon; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outputFCcursor.InsertFeature(outputFeatureBuffer); ...&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2012 14:44:17 GMT</pubDate>
    <dc:creator>YukunXing</dc:creator>
    <dc:date>2012-06-25T14:44:17Z</dc:date>
    <item>
      <title>Problem with merging features created using ICircularArc</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-with-merging-features-created-using/m-p/412096#M11057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need a tool to creat buffer around a point, which is a typicall round buffer, but with one side cut depending on some parameters. Looks like ICircularArc is the perfect class. I get the tool to creat all the buffers as I need and output to either a shapefile or database. However, as a last step I need to merge all the individual buffers to creat a single feature, for which a manual operation is convenient enough. But as soon as I merge them, everything disappears. Doesn't matter if the output is in a GDB or shapefile. Anyone has idea what is going on and what I can do to fix the problem? I'm including the code snippet I used for creating the individual buffers, and a shapefile which if you merge all features, everything will disappear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly, if the geometries of all features are somewhat touched before merging, for example, all polygons selected and cut, merging would work as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;... IPoint point = feature.Shape as IPoint;&amp;nbsp; if (!CompareSpatialRefs(spatialReferenceOut,spatialReferenceSiren)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Project(spatialReferenceOut); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICircularArc circArc = new CircularArcClass(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ILine2 lineClosePolygon = new LineClass(); ISegmentCollection ring1 = new RingClass(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ring1.AddSegment(circArc as ISegment, ref missing, ref missing); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ring1.AddSegment(lineClosePolygon as ISegment, ref missing, ref missing);&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IPolygon4 polygon = new PolygonClass(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon.SpatialReference = spatialReferenceOut;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGeometryCollection geometryCollection = polygon as IGeometryCollection; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryCollection.AddGeometry(ring1 as IGeometry, ref missing, ref missing); circArc.PutCoordsByAngle(point, start_angle, central_angle_span, radius * HorizontalUnit_FT2OutputUnit); lineClosePolygon.PutCoords(circArc.ToPoint, circArc.FromPoint); geometryCollection.GeometriesChanged(); outputFeatureBuffer.Shape = polygon; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outputFCcursor.InsertFeature(outputFeatureBuffer); ...&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 14:44:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-with-merging-features-created-using/m-p/412096#M11057</guid>
      <dc:creator>YukunXing</dc:creator>
      <dc:date>2012-06-25T14:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging features created using ICircularArc</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-with-merging-features-created-using/m-p/412097#M11058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The polygons in your shapefile are oriented in the wrong direction.&amp;nbsp; When you create a polygon, exterior rings should be oriented clockwise.&amp;nbsp; A ring that is oriented counter-clockwise is considered a "hole" and will have a negative area.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 18:15:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-with-merging-features-created-using/m-p/412097#M11058</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2012-06-25T18:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with merging features created using ICircularArc</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-with-merging-features-created-using/m-p/412098#M11059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The polygons in your shapefile are oriented in the wrong direction.&amp;nbsp; When you create a polygon, exterior rings should be oriented clockwise.&amp;nbsp; A ring that is oriented counter-clockwise is considered a "hole" and will have a negative area.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed the negative area when I was trying to figure this out but unfortunately didn't follow that up. Seeing your reply I reversed the direction of the circular arc and that resolved the issue! Thank you so much Neil. I've marked your reply as the answer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 19:54:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-with-merging-features-created-using/m-p/412098#M11059</guid>
      <dc:creator>YukunXing</dc:creator>
      <dc:date>2012-06-25T19:54:03Z</dc:date>
    </item>
  </channel>
</rss>

