<?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 MultiPartShapeBuffer -- Multiple Polylines? in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/multipartshapebuffer-multiple-polylines/m-p/254512#M428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to construct a MultiPartShapeBuffer with multiple polyline segments because I need to handle polylines that cross the 180/-180 boundary.&amp;nbsp; I see that the MultiPartShapeBuffer has the setup configuration to support multiple parts but there does not appear to be a way to specify the index or which part you are applying a set of points against?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//init buffer geom for row insertion&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Multipartshapebuffer tempGeom = new multipartshapebuffer();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tempGeom.setup(ShapeType.Polyline, 2, totalPoints);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;list&amp;lt;Point&amp;gt; beforeBreak = new List&amp;lt;Point&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;list&amp;lt;Point&amp;gt; afterBreak = new List&amp;lt;Point&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//build lists&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for{...build point arrays}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//setpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tempRowGeom.Parts = new int[2] {1,2};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tempGeom.Points = beforeBreak.ToArray();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...here is where it runs into problems, the only way to apply a point array to a Geometry is through the property assignment, there is not method to specify multiple or add points to a unique segment.&amp;nbsp; It either adds the points to the existing points list (which causes the same problem as only having a single point list) or overwrites the previous list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas other than creating a separate row in the gdb for each segment?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;E&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Mar 2014 11:01:42 GMT</pubDate>
    <dc:creator>EvanLortie</dc:creator>
    <dc:date>2014-03-24T11:01:42Z</dc:date>
    <item>
      <title>MultiPartShapeBuffer -- Multiple Polylines?</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/multipartshapebuffer-multiple-polylines/m-p/254512#M428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to construct a MultiPartShapeBuffer with multiple polyline segments because I need to handle polylines that cross the 180/-180 boundary.&amp;nbsp; I see that the MultiPartShapeBuffer has the setup configuration to support multiple parts but there does not appear to be a way to specify the index or which part you are applying a set of points against?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//init buffer geom for row insertion&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Multipartshapebuffer tempGeom = new multipartshapebuffer();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tempGeom.setup(ShapeType.Polyline, 2, totalPoints);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;list&amp;lt;Point&amp;gt; beforeBreak = new List&amp;lt;Point&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;list&amp;lt;Point&amp;gt; afterBreak = new List&amp;lt;Point&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//build lists&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for{...build point arrays}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//setpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tempRowGeom.Parts = new int[2] {1,2};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tempGeom.Points = beforeBreak.ToArray();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...here is where it runs into problems, the only way to apply a point array to a Geometry is through the property assignment, there is not method to specify multiple or add points to a unique segment.&amp;nbsp; It either adds the points to the existing points list (which causes the same problem as only having a single point list) or overwrites the previous list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas other than creating a separate row in the gdb for each segment?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;E&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 11:01:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/multipartshapebuffer-multiple-polylines/m-p/254512#M428</guid>
      <dc:creator>EvanLortie</dc:creator>
      <dc:date>2014-03-24T11:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: MultiPartShapeBuffer -- Multiple Polylines?</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/multipartshapebuffer-multiple-polylines/m-p/254513#M429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The shapefile format (on which this transfer buffer is based) just has an&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;array of part offsets and an array of points.&amp;nbsp; The parts offsets specify where&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to break the shape (starting with zero, unfortunately).&amp;nbsp; So, for a two part&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;shape, you only need one point array (with all the points) and a correct &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parts buffer, with offsets of 0 and {number_of_points_in_part1}.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is not ever legal to specify an offset of 1, or to use consecutive values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the parts array, since lines must have at least two vertices, and polygons &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;must have at least four.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 17:44:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/multipartshapebuffer-multiple-polylines/m-p/254513#M429</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2014-03-24T17:44:32Z</dc:date>
    </item>
  </channel>
</rss>

