<?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 get the geometry from an ILayer object in C# in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geometry-from-an-ilayer-object-in-c/m-p/405197#M10821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What type of layer is it?&amp;nbsp; Some layer types do not implement IFeatureLayer; e.g. Raster Layer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Mar 2011 13:21:47 GMT</pubDate>
    <dc:creator>BradChappell</dc:creator>
    <dc:date>2011-03-04T13:21:47Z</dc:date>
    <item>
      <title>How to get the geometry from an ILayer object in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geometry-from-an-ilayer-object-in-c/m-p/405196#M10820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From reading the documentation, I assumed that this was the way to accomplish that.&amp;nbsp; However, I got an error when I tried to cast an ILayer object to an IFeatureLayer object.&amp;nbsp; This is the snippit of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ILayer pLayer = aMap.get_Layer(layercount - 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IFeatureLayer pFeatureLayer = (IFeatureLayer)pLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IFeature pFeature = pFeatureClass.CreateFeature();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeometry pGeometry = pFeature.Shape;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 19:28:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geometry-from-an-ilayer-object-in-c/m-p/405196#M10820</guid>
      <dc:creator>ReneeCammarere</dc:creator>
      <dc:date>2011-03-03T19:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the geometry from an ILayer object in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geometry-from-an-ilayer-object-in-c/m-p/405197#M10821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What type of layer is it?&amp;nbsp; Some layer types do not implement IFeatureLayer; e.g. Raster Layer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 13:21:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geometry-from-an-ilayer-object-in-c/m-p/405197#M10821</guid>
      <dc:creator>BradChappell</dc:creator>
      <dc:date>2011-03-04T13:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the geometry from an ILayer object in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geometry-from-an-ilayer-object-in-c/m-p/405198#M10822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just to build on what was already said, you need to check if your ILayer is a 'TypeOf'&amp;nbsp; IFeatureLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this returns true then you can check the featureclass ShapeType property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2011 13:47:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geometry-from-an-ilayer-object-in-c/m-p/405198#M10822</guid>
      <dc:creator>BrianBottoms</dc:creator>
      <dc:date>2011-03-07T13:47:37Z</dc:date>
    </item>
  </channel>
</rss>

