<?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 Geoprocessing with Geometry in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/geoprocessing-with-geometry/m-p/259706#M6671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am struggling to get an GP tool to work with Geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I do is create an IPolygon object through .NET code. All that works great except sometimes the results have slivers. So it looks like the &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/integrate.htm"&gt;Integrate &lt;/A&gt;tool could help me here. Again I have an IPolygon object and am not creating any feature classes on disk. I will draw the polygon to the screen and that is it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I try this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;'use the Integrate tool to get rid of slivers&lt;BR /&gt; Dim gp As Geoprocessor = New Geoprocessor&lt;BR /&gt; gp.OverwriteOutput = True&lt;BR /&gt; gp.AddOutputsToMap = False&lt;BR /&gt; Dim intgGeom As Integrate = New Integrate&lt;BR /&gt; intgGeom.in_features = pClonePolygon 'the input polygon&lt;BR /&gt; intgGeom.cluster_tolerance = "2 Meters" 'set the XYTolerance to 2 Meters&lt;BR /&gt; gp.Execute(intgGeom, Nothing)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No cigar. I get this exception:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in ESRI.ArcGIS.Geoprocessor.dll&lt;BR /&gt;System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;According to this help page all GP tools should work with geometry:&amp;nbsp;&lt;A class="" href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/python/using-geometry-objects-with-geoprocessing-tools.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/python/using-geometry-objects-with-geoprocessing-tools.htm"&gt;Using geometry objects with geoprocessing tools—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;So what am I doing wrong here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~AGP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2018 16:10:33 GMT</pubDate>
    <dc:creator>AbelPerez</dc:creator>
    <dc:date>2018-03-23T16:10:33Z</dc:date>
    <item>
      <title>Geoprocessing with Geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/geoprocessing-with-geometry/m-p/259706#M6671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am struggling to get an GP tool to work with Geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I do is create an IPolygon object through .NET code. All that works great except sometimes the results have slivers. So it looks like the &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/integrate.htm"&gt;Integrate &lt;/A&gt;tool could help me here. Again I have an IPolygon object and am not creating any feature classes on disk. I will draw the polygon to the screen and that is it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I try this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;'use the Integrate tool to get rid of slivers&lt;BR /&gt; Dim gp As Geoprocessor = New Geoprocessor&lt;BR /&gt; gp.OverwriteOutput = True&lt;BR /&gt; gp.AddOutputsToMap = False&lt;BR /&gt; Dim intgGeom As Integrate = New Integrate&lt;BR /&gt; intgGeom.in_features = pClonePolygon 'the input polygon&lt;BR /&gt; intgGeom.cluster_tolerance = "2 Meters" 'set the XYTolerance to 2 Meters&lt;BR /&gt; gp.Execute(intgGeom, Nothing)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No cigar. I get this exception:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in ESRI.ArcGIS.Geoprocessor.dll&lt;BR /&gt;System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;According to this help page all GP tools should work with geometry:&amp;nbsp;&lt;A class="" href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/python/using-geometry-objects-with-geoprocessing-tools.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/python/using-geometry-objects-with-geoprocessing-tools.htm"&gt;Using geometry objects with geoprocessing tools—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;So what am I doing wrong here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~AGP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:10:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/geoprocessing-with-geometry/m-p/259706#M6671</guid>
      <dc:creator>AbelPerez</dc:creator>
      <dc:date>2018-03-23T16:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing with Geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/geoprocessing-with-geometry/m-p/259707#M6672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I experimented with some code and I too get an error when I supply a single polygon geometry. It does not error if I supply a FeatureLayer but it did crash! I think this is a tool that can only accept a dataset despite what the help file says.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 11:25:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/geoprocessing-with-geometry/m-p/259707#M6672</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2018-03-29T11:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing with Geometry</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/geoprocessing-with-geometry/m-p/259708#M6673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also tried an in-memory feature class and that crashes with a COM exception.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 14:18:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/geoprocessing-with-geometry/m-p/259708#M6673</guid>
      <dc:creator>AbelPerez</dc:creator>
      <dc:date>2018-03-29T14:18:53Z</dc:date>
    </item>
  </channel>
</rss>

