<?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: How to query and get segment of polygon by shape in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623194#M16746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will use ISpatialFilter to get the polygons.&amp;nbsp; For each polygon, cast from IPolygon to ISegmentCollection interface, you get the segments that you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jul 2013 21:26:15 GMT</pubDate>
    <dc:creator>WeifengHe</dc:creator>
    <dc:date>2013-07-15T21:26:15Z</dc:date>
    <item>
      <title>How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623193#M16745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi every one, i have a issue.I have a feature class type of polygon in SDE geodatabase, and i want to query by a shape and get all segment of polygon within shape (only segment, not all polygon) .How can i do it.I use arcgis engine 9.3 and C#.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and Regard.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cuongdx&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 08:44:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623193#M16745</guid>
      <dc:creator>doxuan_cuong</dc:creator>
      <dc:date>2013-07-15T08:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623194#M16746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will use ISpatialFilter to get the polygons.&amp;nbsp; For each polygon, cast from IPolygon to ISegmentCollection interface, you get the segments that you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 21:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623194#M16746</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-15T21:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623195#M16747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;But I want to get a part of segment in shape, not all segment.How can i do it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 00:28:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623195#M16747</guid>
      <dc:creator>doxuan_cuong</dc:creator>
      <dc:date>2013-07-16T00:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623196#M16748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use ITopologicalOperator::Intersect with output option set to esriGeometry2Dimension, you get a polygon, and then cast to ISegmentCollection.&amp;nbsp; All the segments in this collection will be within the shape.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 14:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623196#M16748</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-16T14:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623197#M16749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you&amp;nbsp; weif4314 , although i don't really know how to do but i will try by that way.Can you support me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 00:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623197#M16749</guid>
      <dc:creator>doxuan_cuong</dc:creator>
      <dc:date>2013-07-17T00:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623198#M16750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No problem.&amp;nbsp; I will try my best to help.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First you need to get the polygon feature class, and a shape (a polygon or an envelope I assume) as input in your code.&amp;nbsp;&amp;nbsp; We can then start from there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What programming language you use?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 16:26:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623198#M16750</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-17T16:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623199#M16751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I use arcgis engine 9.3 and C#, i want to query geodatabase by a rectangle and get all polygon or segment within rectangle.So i intend to query all polygon and use ITopologicalOperator::Intersect to get segment within rectangle.Is it the best way?Do you have any code about it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 01:46:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623199#M16751</guid>
      <dc:creator>doxuan_cuong</dc:creator>
      <dc:date>2013-07-18T01:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623200#M16752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I use this code to find intersect of 2 polygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
void CreatePolylineFromExistingGeometries(ESRI.ArcGIS.Geometry.IPolygon pPolygon1,
&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.IPolygon pPolygon2)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Build a new polyline by intersecting two existing polygons.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.ITopologicalOperator2 pTopoOp2 = pPolygon1 as
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ITopologicalOperator2;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Simplify.
&amp;nbsp;&amp;nbsp;&amp;nbsp; pTopoOp2.IsKnownSimple_2 = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; pTopoOp2.Simplify();

&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.IPolyline pPoly = pTopoOp2.Intersect(pPolygon2,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.esriGeometryDimension.esriGeometry1Dimension) as
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IPolyline;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //pPoly is the new generated polyline.
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but when i check pPoly ( new polyline generated) then the properties IsEmpty of pPoly is true so i can't show pPoly&amp;nbsp; in map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i change esriGeometry1Dimension to esriGeometry2Dimension and return IPolygon then i can show Polygon intersect of 2 polygon. But i want to use polyline more than polygon intersect. So how to fix this problem?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623200#M16752</guid>
      <dc:creator>doxuan_cuong</dc:creator>
      <dc:date>2021-12-12T02:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623201#M16753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd use esriGeometry2Dimension as I metntioned before to get the polygon output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.Geometry.IPolygon pPoly = pTopoOp2.Intersect(pPolygon2,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Geometry.esriGeometryDimension.esriGeometry2Dimension) as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IPolygon;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I will use ISegmentCollection&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ISegmentCollection pSegColl = pPoly as ISegmentCollection&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int count = pSegColl.SegmentCount&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for(int i = 0; i&amp;lt;count; i++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISegment pSeg = pSegColl(i);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Do whatever you want with it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can create a segment collection of polyline type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ISegmentCollection pSegColl2 = new Polyline() as ISegmentCollection&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then add all the segment from the pSegColl to pSegColl2.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't check the syntax of the code, but you got the idea.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 21:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623201#M16753</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-19T21:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623202#M16754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great.It work for me, thanks you weif4314 .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 07:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623202#M16754</guid>
      <dc:creator>doxuan_cuong</dc:creator>
      <dc:date>2013-07-22T07:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623203#M16755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you please mark the thread as answered to close it, and help other people to find the solution to similar problems?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 17:11:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623203#M16755</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-22T17:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623204#M16756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Of couse I will try my best to help another people to find solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know how to mark thread is answered to close.Can you show me how to do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 06:33:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623204#M16756</guid>
      <dc:creator>doxuan_cuong</dc:creator>
      <dc:date>2013-07-24T06:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to query and get segment of polygon by shape</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623205#M16757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please go to the top of the page, there are lines highlighted in yellow shows how to mark the thread as answered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 15:03:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-query-and-get-segment-of-polygon-by-shape/m-p/623205#M16757</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-07-24T15:03:22Z</dc:date>
    </item>
  </channel>
</rss>

