<?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 Convert polygone to polyline  in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/convert-polygone-to-polyline/m-p/827575#M5429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feature layer why contains a feature class, wich containes features, whose shapes are polygons and I want to convert these polygons into lines/polylines.&lt;/P&gt;&lt;P&gt;I found the tool&amp;nbsp;DataManagementTools.PolygonToLine wich seems the adequate one to do the job but my code (in VB.Net) doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is (a bit simplified, I just give waht is useful in my opinion):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pNewFeatureClass As ESRI.ArcGIS.Geodatabase.IFeatureClass&lt;/P&gt;&lt;P&gt;Dim pFeatureCursor As ESRI.ArcGIS.Geodatabase.IFeatureCursor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pNewFeatureClass = AddFeatureClass(pFeatureWorkspace, strFeatureDatasetName, ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryLine, sFeatureClassName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pFeatureCursor = pFeatureClass.Search(Nothing, False)&lt;BR /&gt; pFeature = pFeatureCursor.NextFeature&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While (Not pFeature Is Nothing)&lt;BR /&gt; Dim pConvertTool As ESRI.ArcGIS.DataManagementTools.PolygonToLine&lt;BR /&gt; Dim OutLine As ESRI.ArcGIS.Geometry.Line&lt;BR /&gt; Dim pNewFeatureBuffer As ESRI.ArcGIS.Geodatabase.IFeatureClass&lt;BR /&gt; Dim pLine As ESRI.ArcGIS.Geometry.IGeometry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OutLine = New ESRI.ArcGIS.Geometry.Line&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; pConvertTool = New DataManagementTools.PolygonToLine(pFeature.Shape, OutLine)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' ---- Add the closed line to the new FeatureClass as a Polygon, copying the attributes.&lt;BR /&gt; pLline = pConvertTool.out_feature_class&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ' ---- Create a featurebuffer in the output feature class&lt;BR /&gt; pNewFeatureBuffer = pNewFeatureClass.CreateFeatureBuffer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' ---- Copy the shape to the feature buffer&lt;BR /&gt; pNewFeatureBuffer.Shape = pLine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an error at the line:&amp;nbsp;&lt;SPAN&gt;pNewFeatureBuffer.Shape = pLine although pLine is filled whot a LineClass whose geometry type seems to be a line as defined for the&amp;nbsp;pNewFeatureBuffer.Shape.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried different things, and the error in the different cases is "this type of geometry is not considered" (translated freely from french) or a memory error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2020 13:24:01 GMT</pubDate>
    <dc:creator>PaulLESP</dc:creator>
    <dc:date>2020-03-03T13:24:01Z</dc:date>
    <item>
      <title>Convert polygone to polyline</title>
      <link>https://community.esri.com/t5/developers-questions/convert-polygone-to-polyline/m-p/827575#M5429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feature layer why contains a feature class, wich containes features, whose shapes are polygons and I want to convert these polygons into lines/polylines.&lt;/P&gt;&lt;P&gt;I found the tool&amp;nbsp;DataManagementTools.PolygonToLine wich seems the adequate one to do the job but my code (in VB.Net) doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is (a bit simplified, I just give waht is useful in my opinion):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pNewFeatureClass As ESRI.ArcGIS.Geodatabase.IFeatureClass&lt;/P&gt;&lt;P&gt;Dim pFeatureCursor As ESRI.ArcGIS.Geodatabase.IFeatureCursor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pNewFeatureClass = AddFeatureClass(pFeatureWorkspace, strFeatureDatasetName, ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryLine, sFeatureClassName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pFeatureCursor = pFeatureClass.Search(Nothing, False)&lt;BR /&gt; pFeature = pFeatureCursor.NextFeature&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While (Not pFeature Is Nothing)&lt;BR /&gt; Dim pConvertTool As ESRI.ArcGIS.DataManagementTools.PolygonToLine&lt;BR /&gt; Dim OutLine As ESRI.ArcGIS.Geometry.Line&lt;BR /&gt; Dim pNewFeatureBuffer As ESRI.ArcGIS.Geodatabase.IFeatureClass&lt;BR /&gt; Dim pLine As ESRI.ArcGIS.Geometry.IGeometry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OutLine = New ESRI.ArcGIS.Geometry.Line&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; pConvertTool = New DataManagementTools.PolygonToLine(pFeature.Shape, OutLine)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' ---- Add the closed line to the new FeatureClass as a Polygon, copying the attributes.&lt;BR /&gt; pLline = pConvertTool.out_feature_class&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ' ---- Create a featurebuffer in the output feature class&lt;BR /&gt; pNewFeatureBuffer = pNewFeatureClass.CreateFeatureBuffer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' ---- Copy the shape to the feature buffer&lt;BR /&gt; pNewFeatureBuffer.Shape = pLine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an error at the line:&amp;nbsp;&lt;SPAN&gt;pNewFeatureBuffer.Shape = pLine although pLine is filled whot a LineClass whose geometry type seems to be a line as defined for the&amp;nbsp;pNewFeatureBuffer.Shape.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried different things, and the error in the different cases is "this type of geometry is not considered" (translated freely from french) or a memory error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2020 13:24:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/convert-polygone-to-polyline/m-p/827575#M5429</guid>
      <dc:creator>PaulLESP</dc:creator>
      <dc:date>2020-03-03T13:24:01Z</dc:date>
    </item>
  </channel>
</rss>

