<?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: Attribute rule to create polygon feature from line features. in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1364435#M76738</link>
    <description>&lt;P&gt;Hey Hlynur,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this scenario is described in this blog:&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2023 07:17:23 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-12-27T07:17:23Z</dc:date>
    <item>
      <title>Attribute rule to create polygon feature from line features.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1271223#M67111</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hoping someone might be able to help me with writing an attribute rule that will generate polygons in a feature class triggered by the creation of lines that form closed areas in another feature class.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imagine this rule&amp;nbsp;would work by looking at whether the line created closes a shape (based on some topology) and if 'yes' then a polygon is created if 'no' then a polygon is not created.&lt;/P&gt;&lt;P&gt;This rule would be a huge help for those of us creating maps that would like to see what our maps are looking like in real time rather than having to run the features to polygons tool over&amp;nbsp;and over.&lt;/P&gt;&lt;P&gt;There would need to be some other attributes for the polygons, but I thought I'd start with generating a polygon first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for any help you might provide.&lt;/P&gt;&lt;P&gt;@&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/migrated-users/154383" target="_blank"&gt;Hussein Nasser&lt;/A&gt;&lt;/P&gt;&lt;P&gt;@&lt;A href="https://community.esri.com/migrated-users/3100" target="_blank"&gt;Xander Bakker&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 23:13:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1271223#M67111</guid>
      <dc:creator>katherinealexander_USGS</dc:creator>
      <dc:date>2023-03-23T23:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule to create polygon feature from line features.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1271255#M67116</link>
      <description>&lt;P&gt;You could do something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Calculation Attribute Rule on the Line fc
// field: leave empy
// triggers: insert
// exclude from application evaluation

// get the vertices
var vertices = Geometry($feature).paths[0]

// if first vertex isn't the same as last vertex, abort
var same = vertices[0].x == vertices[-1].x &amp;amp;&amp;amp; vertices[0].y == vertices[-1].y
if(!same) { return }

// create the polygon
var sr = Geometry($feature).spatialReference
var poly_vertices = []
for(var v in vertices) {
    var vertex = [vertices[v].x, vertices[v].y]
    Push(poly_vertices, vertex)
}
var poly = Polygon({rings: [poly_vertices], spatialReference: sr})

// insert the polygon into the polygon fc
return {
    edit: [{
        className: "NameOfYourPolygonFC",
        adds: [{
            geometry: poly,
            attributes: {} // you can add attributes here
        }]
    }]
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 Mar 2023 07:36:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1271255#M67116</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-03-24T07:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule to create polygon feature from line features.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1361323#M76423</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;and thanks for a great solution.&lt;/P&gt;&lt;P&gt;I have a similar problem, being that I need polygons to be created automatically in one feature when a point is created in another one, the polygons being a buffer for the point set to a default radius.&lt;/P&gt;&lt;P&gt;So to sum up, a point is created in a feature and automatically a polygon (buffer) is added in another polygon feature (with the respective point being the polygon/buffer center).&lt;/P&gt;&lt;P&gt;Any tips on how such a attribute rule might look like?&lt;/P&gt;&lt;P&gt;With regards, Hlynur.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 07:59:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1361323#M76423</guid>
      <dc:creator>Hlynur</dc:creator>
      <dc:date>2023-12-15T07:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule to create polygon feature from line features.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1364435#M76738</link>
      <description>&lt;P&gt;Hey Hlynur,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this scenario is described in this blog:&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 07:17:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1364435#M76738</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-12-27T07:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute rule to create polygon feature from line features.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1367313#M77081</link>
      <description>&lt;P&gt;Great! Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;and happy 2024 to all!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 13:27:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-create-polygon-feature-from-line/m-p/1367313#M77081</guid>
      <dc:creator>Hlynur</dc:creator>
      <dc:date>2024-01-08T13:27:24Z</dc:date>
    </item>
  </channel>
</rss>

