<?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: Features to ILayer, symbology and oracle sdo in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357453#M9449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think there is some confusion here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; There is no such thing as an ILayer object.&amp;nbsp; ILayer is an interface.&amp;nbsp; There is a class FeatureLayer that can be cocreated (new) into an object.&amp;nbsp; The FeatureLayer class implements the ILayer interface.&amp;nbsp; The FeatureLayer also implements the IfeatureLayer interface that has a write property of featureclass.&amp;nbsp; This is where you set a reference to your featureclass.&amp;nbsp; The FeatureLayer class also implements an interface called Ifeaturelayerdefinition where you can put a where clause to filter the featureclass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. There a quite a few intermediate steps to setting a symbol to a point layer.&amp;nbsp; I suggest looking and the SimpleRenderer class and the Create Picture Marker Symbol Snippet in the documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. SDO Geometry is a storage format for shapes in Oracle.&amp;nbsp; IGeometry is an interface on geometry classes suchs PolygonClass, PointClass etc.&amp;nbsp; An IGeometry is not a storage format.&amp;nbsp; It is part of the arcobjects API that allows you to manipulate the geometry in memory.&amp;nbsp; Arcobjects takes care of reading the SDO Geometry into memory and allows you access to that space in memory throught the IGeometry.&amp;nbsp; There is no conversion possible since IGeometry is not a data format.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jun 2010 14:28:56 GMT</pubDate>
    <dc:creator>AlexanderGray</dc:creator>
    <dc:date>2010-06-17T14:28:56Z</dc:date>
    <item>
      <title>Features to ILayer, symbology and oracle sdo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357452#M9448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1. I Have FeatureClass (SDE Table). I want to create ILayer object that will contain some of the features, according to filter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I Created a IQueryFilter, and i got IFetureCursor with the features i need. But now how i convert it to an ILayer object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought about creating new featureclass (IFeatureWorkspace.CrateFeatureClass), and add those features to it, but it seems a lot of work, and i need to take care each time to delete this FC (because it's temporary FC). I'm sure there is an easier way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. I have Layer of points. I want to chenge the symbology, so i created IPictureMarkerSymbol, but when&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i used the CreateSymbolFromPicture method (the path is valid and bmp file), i see in debug mode that the Picture property is set to "Catastrophic failure..."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Is there a converter which convert SDO Geometry to ESRI's IGeometry?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 10:38:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357452#M9448</guid>
      <dc:creator>LiorY</dc:creator>
      <dc:date>2010-06-17T10:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Features to ILayer, symbology and oracle sdo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357453#M9449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think there is some confusion here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; There is no such thing as an ILayer object.&amp;nbsp; ILayer is an interface.&amp;nbsp; There is a class FeatureLayer that can be cocreated (new) into an object.&amp;nbsp; The FeatureLayer class implements the ILayer interface.&amp;nbsp; The FeatureLayer also implements the IfeatureLayer interface that has a write property of featureclass.&amp;nbsp; This is where you set a reference to your featureclass.&amp;nbsp; The FeatureLayer class also implements an interface called Ifeaturelayerdefinition where you can put a where clause to filter the featureclass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. There a quite a few intermediate steps to setting a symbol to a point layer.&amp;nbsp; I suggest looking and the SimpleRenderer class and the Create Picture Marker Symbol Snippet in the documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. SDO Geometry is a storage format for shapes in Oracle.&amp;nbsp; IGeometry is an interface on geometry classes suchs PolygonClass, PointClass etc.&amp;nbsp; An IGeometry is not a storage format.&amp;nbsp; It is part of the arcobjects API that allows you to manipulate the geometry in memory.&amp;nbsp; Arcobjects takes care of reading the SDO Geometry into memory and allows you access to that space in memory throught the IGeometry.&amp;nbsp; There is no conversion possible since IGeometry is not a data format.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 14:28:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357453#M9449</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2010-06-17T14:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Features to ILayer, symbology and oracle sdo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357454#M9450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;just let me add some things to Alexanders good posting. First, you describe three problems in one thread. For the sake of simplicity, open one thread per problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) The normal approach is to create a feature layer and set the feature class as data source of the layer. By setting a definition query, you can filter out some features based on a SQL query. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are some steps to write the desired code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create an FeatureLayer object using the new keyword, cast to IFeatureLayer interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Open the feature class from your SDE workspace and set it to the FeatureClass property of the created IFeatureLayer object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cast the IFeatureLayer object to IFeatureLayerDefinition and set the desired Definition Query by using the DefinitionExpression property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can then add the IFeatureLayer object to the FocusMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Do you want to access the geometry of the feature class? The geometry of a feature class (a point, a line, a polygon, ...) can be retrieved by the Shape property of the IFeature class. When you open a feature class from an Oracle SDE workspace, the Shape could be stored in the geodatabase using the SDO_Geometry format. In ArcObjects, you are normally not interested of the exact format type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second note: When you read the Shape property, you get an object of type IGeometry. You would normally cast it to the corresponding geometry class, eg IPoint, IPolyLine, IPolygon ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps. Best regards, Stefan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 17:32:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357454#M9450</guid>
      <dc:creator>StefanOffermann</dc:creator>
      <dc:date>2010-06-17T17:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Features to ILayer, symbology and oracle sdo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357455#M9451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;At 10.0 you might try a Query Layer if you want to bypass arcsde.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_a_query_layer/00s50000000n000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_a_query_layer/00s50000000n000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 20:23:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357455#M9451</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2010-06-17T20:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Features to ILayer, symbology and oracle sdo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357456#M9452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First, thanx for all the replies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;About question #2, I looked in the documentation, but i don't see nothing wrong with my code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;About question #3, My intention was that after i made a "select" command, say "select shape from layer where sdo_distance(...)", I want to get those shapes and do actions with them, so I want to convert it to Arcobjects...I'm sure it's possible...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 14:18:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357456#M9452</guid>
      <dc:creator>LiorY</dc:creator>
      <dc:date>2010-06-18T14:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Features to ILayer, symbology and oracle sdo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357457#M9453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For question 2, please post your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;question 3: If I were going to work with SDO geometry as a featurelayer in 9.3.1 or earilier, I would write a plugindatasource.&amp;nbsp; See this &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisengine/dotnet/61c9658b-1a8e-4192-8456-470c73e33da3.htm"&gt;sample&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of having it read from a text file though, I'd have it read from Oracle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd use Oracle's SDO_UTIL.TO_WKBGEOMETRY to convert into WKB, then use IWkb.ImportFromWkb to convert into IGeometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IWkb is implemented by point, polyline and polyline classes (even though this is not documented).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, at 10.0 the QueryLayers do all this for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 15:28:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357457#M9453</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2010-06-18T15:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Features to ILayer, symbology and oracle sdo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357458#M9454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will take a look on this WKB...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;about the code, here it is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;==============================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string path = @"C:\pic.bmp";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPictureMarkerSymbol sym = new PictureMarkerSymbolClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sym.CreateMarkerSymbolFromFile(esriIPictureBitmap, path);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;==============================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, when i'm debugging it, after the last line, when i watch the sym.Picture property i see the catastrophic failure exception...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 16:07:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/features-to-ilayer-symbology-and-oracle-sdo/m-p/357458#M9454</guid>
      <dc:creator>LiorY</dc:creator>
      <dc:date>2010-06-18T16:07:45Z</dc:date>
    </item>
  </channel>
</rss>

