<?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 Extract Spatial ID from a Polygon in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/extract-spatial-id-from-a-polygon/m-p/1049302#M20311</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to ArcObjects, I am spinning my wheels extracting Spatial ID from a polygon. I have a features with 100 blocks when I add a point features on polygon feature. I need its ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or link is appreciated.&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 18:30:21 GMT</pubDate>
    <dc:creator>rajujee</dc:creator>
    <dc:date>2021-04-20T18:30:21Z</dc:date>
    <item>
      <title>Extract Spatial ID from a Polygon</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/extract-spatial-id-from-a-polygon/m-p/1049302#M20311</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to ArcObjects, I am spinning my wheels extracting Spatial ID from a polygon. I have a features with 100 blocks when I add a point features on polygon feature. I need its ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or link is appreciated.&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 18:30:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/extract-spatial-id-from-a-polygon/m-p/1049302#M20311</guid>
      <dc:creator>rajujee</dc:creator>
      <dc:date>2021-04-20T18:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Spatial ID from a Polygon</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/extract-spatial-id-from-a-polygon/m-p/1050682#M20313</link>
      <description>&lt;P&gt;You need to spend more time constructing your question so it will be understood.&amp;nbsp; It appears you are trying to to search polygons with a point feature.&amp;nbsp; If this is so you want to start by creating a spatial filter&lt;/P&gt;&lt;P&gt;Here is a sample that is set up to intersect:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; public static ISpatialFilter CreateSpatialFilter(IFeatureClass fc, IGeometry shape)
        {
            if (fc == null) return null;
            ISpatialFilter sf = new SpatialFilterClass();
            sf.GeometryField = fc.ShapeFieldName;
            sf.Geometry = shape; 
            sf.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;
            return sf;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can use this directly on your feature class using the Search function..&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IFeatureCursor fcursor = fc.Search(CreateSpatialFilter(fc, shape), true);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now index through the cursor to get the polygon id's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Luck&lt;/P&gt;&lt;P&gt;Brent Hoskisson&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 14:39:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/extract-spatial-id-from-a-polygon/m-p/1050682#M20313</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2021-04-23T14:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Spatial ID from a Polygon</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/extract-spatial-id-from-a-polygon/m-p/1052909#M20314</link>
      <description>&lt;P&gt;This worked as a charm. Thanks Brent.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 20:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/extract-spatial-id-from-a-polygon/m-p/1052909#M20314</guid>
      <dc:creator>rajujee</dc:creator>
      <dc:date>2021-04-29T20:18:48Z</dc:date>
    </item>
  </channel>
</rss>

