<?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 Re: Reshaping polygon throws error in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281651#M7269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are the shaper geometry and edit geometry simple?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jul 2013 18:10:43 GMT</pubDate>
    <dc:creator>WeifengHe</dc:creator>
    <dc:date>2013-07-26T18:10:43Z</dc:date>
    <item>
      <title>Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281648#M7266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after being glad to have solved my last problem I just come up with a new one which I can´t figure out. When reshaping a polygon I use Ring#Reshape(IPath), which gives me a boolean if all worked fine. Unfortunelty it won´t give me any return-value but an exception which is -2147220936. I just looked the codes and found NETWORK_E_EDIT_SESSION_IN_PROGRESS but as the &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/89133-Apply-buffer-around-polyline?p=315998&amp;amp;viewfull=1#post315998"&gt;last&lt;/A&gt;&lt;SPAN&gt; problem wasn´t related with any Network-features (since I do not use them at all) I´ll bet this error has also nothing to do with this confusing message. So I googled for the error-code and found out that the actual error-message to this code is "The coordinates or measures are out of bounds." (which I cannot conform again as I do not receive any error-message). But as the concerned feature is located in the centre of my featureClass I cannot imagine this is really the clue. So which error is right and what exactly does it have to do with my problem of reshaping an IRing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 14:36:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281648#M7266</guid>
      <dc:creator>CarstenSchumann</dc:creator>
      <dc:date>2013-07-25T14:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281649#M7267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Without seeing the actual data and code, I can only take a guess on the cause of the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error message should be "The coordinates or measures are out of bounds."&amp;nbsp; rather than the other one you mentioned, NETWORK_E_EDIT_SESSION_IN_PROGRESS.&amp;nbsp; The error code associated with this error message can be returned from various places in ArcGIS library.&amp;nbsp; In addition to check the feature geometry's location in the coordinate system, the attributes measurement such as Z and M is also considered as the possible cause here.&amp;nbsp; Also, if the geometry involves curve segment, like bezier, clothid, etc., can sometimes also causes this problem during the process.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 19:53:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281649#M7267</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-25T19:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281650#M7268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;as I do not enabled m- or z-values I can ensure thats not the problem. I post some code that may help to identify the problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IGeometryCollection rings = (IGeometryCollection) editGeometry; // the rings of the edit-geometry
IGeometryCollection paths = (IGeometryCollection) reshaper; // the paths of the reshaper

if (paths.GeometryCount &amp;gt; 1) throw new ArgumentException("The reshape-geometry must be single-part");

for (int i = 0; i &amp;lt; rings.GeometryCount; i++) {

 // get the affected rings of the current polygon

 IRelationalOperator relOp1 = (IRelationalOperator) reshaper.FromPoint;
 IRelationalOperator relOp2 = (IRelationalOperator) reshaper.ToPoint;
 // check if Ring touches from- and toPoint of the reshaper
 if (relOp1.Touches(singlePolygon) &amp;amp;&amp;amp; relOp2.Touches(singlePolygon)) {
&amp;nbsp; IPath path = (IPath) paths.get_Geometry(0);
&amp;nbsp; bool res = ring.Reshape(path);&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; // only in case of success the ring is reshaped
&amp;nbsp; if (res &amp;amp;&amp;amp; !ring.IsEmpty) return editGeometry;
 }
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just figured out that the spatial-reference of the from- and toPoint of the ring is NULL although the rings reference-system is set. As this was also the problem on my last topic I assume it also has to do with the current one, but I don´t know why the reference gets lost or how I can reset it if the according ring already has one...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size:3;"&gt;EDIT: Sry, I had a writing-mistake, the error-code is -2147220935 rather then 936, so it fits to the received error-message: "an internal error has occured in the geometry system".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:39:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281650#M7268</guid>
      <dc:creator>CarstenSchumann</dc:creator>
      <dc:date>2021-12-11T13:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281651#M7269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are the shaper geometry and edit geometry simple?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 18:10:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281651#M7269</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-26T18:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281652#M7270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are the shaper geometry and edit geometry simple?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yeap, checked it out bye making QI-call to ITopologicalOperator.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 07:01:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281652#M7270</guid>
      <dc:creator>CarstenSchumann</dc:creator>
      <dc:date>2013-07-29T07:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281653#M7271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you please send the data containing the 2 geometries only.&amp;nbsp; I will write a piece of code to try to repro the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 16:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281653#M7271</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-29T16:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281654#M7272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I try to...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The masterClass serves only for information, this is where the Reshaper came from. The slave (in the code above this is the editGeometry) should be reshaped by the Reshaper that has been derived from the MasterClass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope it works...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 13:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281654#M7272</guid>
      <dc:creator>CarstenSchumann</dc:creator>
      <dc:date>2013-07-30T13:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281655#M7273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using the data you provided, I wrote a piece of VBA code, and the reshape call generates correct result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Sub Test_Reshape()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim mxDoc As IMxDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set mxDoc = ThisDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim featLyr As IFeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim featCls As IFeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featLyr = mxDoc.FocusMap.Layer(0) 'PolylineFC
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featCls = featLyr.FeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim feat0 As IFeature
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set feat0 = featCls.GetFeature(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim geomColl0 As IGeometryCollection
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set geomColl0 = feat0.ShapeCopy
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim geom0 As IGeometry
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set geom0 = geomColl0.Geometry(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print geom0.GeometryType
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featLyr = mxDoc.FocusMap.Layer(1) 'SlaveClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featCls = featLyr.FeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim feat1 As IFeature
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set feat1 = featCls.GetFeature(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim geomColl1 As IGeometryCollection
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set geomColl1 = feat1.ShapeCopy
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim geom1 As IGeometry
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set geom1 = geomColl1.Geometry(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print geom1.GeometryType
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ring As IRing
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set ring = geom1
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim path As IPath
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set path = geom0
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print ring.Reshape(path)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print ring.IsEmpty
 
End Sub
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:39:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281655#M7273</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2021-12-11T13:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Reshaping polygon throws error</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281656#M7274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As I already assumed reproducing this error could become hard...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 08:59:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/reshaping-polygon-throws-error/m-p/281656#M7274</guid>
      <dc:creator>CarstenSchumann</dc:creator>
      <dc:date>2013-07-31T08:59:15Z</dc:date>
    </item>
  </channel>
</rss>

