<?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: Depicting Uneven Tree Crowns in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1154295#M52857</link>
    <description>&lt;P&gt;This is the code I used to do the above.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

# Overwrite pre-existing files
arcpy.env.overwriteOutput = True

#####  set input point feature class and output FC for polygons and buffers

infc = r'Database Connections\pathToInputFeatureClass\testpoints'
outfc = r'Database Connections\pathToOutputPolygonFeatureClass\polygons' 
bufffc = r'Database Connections\pathToOutputBufferPolygonFeatureClass\buffers' 

## set the size of the buffer (in map units) for the buffered polygons

buff = 10

##  this line caluclates the x,y values of the points in fields named "x" and "y".
## can omit if you already have these columns with x,y coordinates of the point

arcpy.management.CalculateGeometryAttributes(infc, "x POINT_X;y POINT_Y", '', '', None, "SAME_AS_INPUT")

###  Expects these fields in the input FC.  "x" and "y" are the coordinates
###  the rest I added manually to the FC to hold the new corner coordsinates
###  and the distance measured in each cardinal direction from the tree

#        Index numbers to make it easier to tell what row[#] refers to.
#         [0]   [1]   [2]   [3]   [4]  [5]   [6]   [7]  [8] [9] [10]  [11] [12] [13]
fields = ['X1', 'Y1', 'X2', 'Y2', 'X3','Y3', 'X4', 'Y4','x', 'y', 'n', 's', 'e', 'w']

###  This updatecursor adds/updates the new corner coordinate columns
###   the "- buff" subtracts the buffer value from each new coordinate
###  set to buff=0 above to have straight output without buffer

with arcpy.da.UpdateCursor(infc, fields) as ucursor:
  for row in ucursor: 
      row[0] = row[8] - row[13] - buff
      row[1] = row[9] + row[10] - buff
      row[2] = row[8] + row[12] - buff
      row[3] = row[9] + row[10] - buff
      row[4] = row[8] + row[12] - buff
      row[5] = row[9] - row[11] - buff
      row[6] = row[8] - row[13] - buff
      row[7] = row[9] - row[11] - buff
      ucursor.updateRow(row)  
      
## Fields to establish the search curson on the newly populated input FC.

fields = ['X1', 'Y1', 'X2', 'Y2', 'X3','Y3', 'X4', 'Y4', 'Id','SHAPE@']

## fields for the insert cursor to insert polygons and Id into output FC
##      "SHAPE@" is the geometry column that we insert the polygon into
##       "Id" is the Id column of the input point
##       this way, there is an Id from the respective point in the Polygon
##       you may need to update/add to this if you want other fields copied over

ifields = ['SHAPE@','Id']

## Search cursor inside insert cursor
## Search cursor extracts the new coordinate pairs
## insert cursor inserts the geometry and name ('Id') into the polygon FC

with arcpy.da.InsertCursor(outfc, ifields) as icursor:
    with arcpy.da.SearchCursor(infc,fields) as cursor:
        for s in cursor:
            coords = [(s[0],s[1]),
                      (s[2],s[3]),
                      (s[4],s[5]),
                      (s[6],s[7]),
                      (s[0],s[1])]
            name = s[8]
            icursor.insertRow((coords,name))
            
###  If you set a buffer distance, this will create the buffer to round the corners
            
if buff &amp;gt; 0:
    arcpy.analysis.Buffer(outfc, bufffc, buff, "FULL", "ROUND", "NONE", None, "PLANAR")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 14:57:17 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2022-03-16T14:57:17Z</dc:date>
    <item>
      <title>Depicting Uneven Tree Crowns</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1152974#M52695</link>
      <description>&lt;P&gt;I'm trying to create polygon features depicting the crowns of trees based on a CSV of tree measurements that were collected in the field.&lt;/P&gt;&lt;P&gt;Each tree record includes the co-ordinates of the trunk in X and Y fields, and the crown dimensions are stored as 4 measurements (in metres) that record the distance from the trunk to the edge of the crown at each cardinal direction (north, south, east and west). I need to show crowns that accord with these measurements (i.e. a tree with a 'Crown East' field of 4m and a 'Crown West' field of 2m will need to produce a crown polygon that is suitably asymmetrical).&lt;/P&gt;&lt;P&gt;Is there any way to use Geoprocessing tools to draw ellipses / polygons to represent the crowns based on this information?&lt;/P&gt;&lt;P&gt;I'm using ArcGIS Pro 2.7 with a Basic licence.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 16:31:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1152974#M52695</guid>
      <dc:creator>WennyiDing</dc:creator>
      <dc:date>2022-03-11T16:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Depicting Uneven Tree Crowns</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153566#M52762</link>
      <description>&lt;P&gt;My first thought was the Extrude Features to 3D Symbology feature:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/extrude-features-to-3d-symbology.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/extrude-features-to-3d-symbology.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But this would just make your trees the right height.&amp;nbsp; I'll keep thinking about your actual question.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 21:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153566#M52762</guid>
      <dc:creator>BryndaHatch</dc:creator>
      <dc:date>2022-03-14T21:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Depicting Uneven Tree Crowns</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153574#M52763</link>
      <description>&lt;P&gt;This tool would create ellipses using your attributes, but it assumes a major and a minor axis.&amp;nbsp; (symmetrical, not asymmetrical);&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/distance-direction/create-ellipses.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/data/distance-direction/create-ellipses.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And my last idea is to use Arcade Expressions, but I don't have a specific suggestion to help.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 21:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153574#M52763</guid>
      <dc:creator>BryndaHatch</dc:creator>
      <dc:date>2022-03-14T21:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Depicting Uneven Tree Crowns</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153702#M52779</link>
      <description>&lt;P&gt;Thanks for this. I did have a look at the Create Ellipses tool, but as you say, it seems to only produce symmetrical ellipses. I'll investigate Arcade Expressions and see if I can work anything out.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 09:14:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153702#M52779</guid>
      <dc:creator>WennyiDing</dc:creator>
      <dc:date>2022-03-15T09:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Depicting Uneven Tree Crowns</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153936#M52809</link>
      <description>&lt;P&gt;Not sure about a geoprocessing tool, but with arcpy this is pretty simple.&lt;/P&gt;&lt;P&gt;Though, with 4 measures from the point, it will create rectangles oriented N/S/E/W.&lt;/P&gt;&lt;P&gt;Basically, would add new columns for 4 coordinate pairs (X1,Y1,&amp;nbsp; X2, Y2,........Y4).&lt;/P&gt;&lt;P&gt;then you would add/subtract the measures from the coordinates giving you the corner points of the polygon.&lt;/P&gt;&lt;P&gt;Dump those points to a polygon, and you have your rectangles.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RhettZufelt_0-1647367006737.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36407iBE60D54C93FE7F5F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RhettZufelt_0-1647367006737.png" alt="RhettZufelt_0-1647367006737.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could even subtract a certain amount from the difference, then buffer with that amount to make them rounded corner rectangles (same point as above, but minus 10 from polygon, then 10 on buffer).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RhettZufelt_1-1647367058676.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36408i315EE7CC3DE4D33A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RhettZufelt_1-1647367058676.png" alt="RhettZufelt_1-1647367058676.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If arcpy is an option for you, I can share the code that did the above.&amp;nbsp; would just need some tweaking to fit your dataset.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With GeoTools, you could massage the spreadsheet then use one of &lt;A href="https://support.esri.com/en/technical-article/000021848" target="_self"&gt;these methods&lt;/A&gt; to generate the polygons.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 18:09:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1153936#M52809</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-03-15T18:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Depicting Uneven Tree Crowns</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1154180#M52844</link>
      <description>&lt;P&gt;Thanks for this!&lt;/P&gt;&lt;P&gt;If you're happy to share the code, I'll have a look and see if I can get to the buffered rectangles as above. Unfortunately, I'll probably have to keep going from there to see if I can get them a little closer to real crown shapes / ellipses after that, but this is definitely a step in the right direction.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 10:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1154180#M52844</guid>
      <dc:creator>WennyiDing</dc:creator>
      <dc:date>2022-03-16T10:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Depicting Uneven Tree Crowns</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1154295#M52857</link>
      <description>&lt;P&gt;This is the code I used to do the above.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

# Overwrite pre-existing files
arcpy.env.overwriteOutput = True

#####  set input point feature class and output FC for polygons and buffers

infc = r'Database Connections\pathToInputFeatureClass\testpoints'
outfc = r'Database Connections\pathToOutputPolygonFeatureClass\polygons' 
bufffc = r'Database Connections\pathToOutputBufferPolygonFeatureClass\buffers' 

## set the size of the buffer (in map units) for the buffered polygons

buff = 10

##  this line caluclates the x,y values of the points in fields named "x" and "y".
## can omit if you already have these columns with x,y coordinates of the point

arcpy.management.CalculateGeometryAttributes(infc, "x POINT_X;y POINT_Y", '', '', None, "SAME_AS_INPUT")

###  Expects these fields in the input FC.  "x" and "y" are the coordinates
###  the rest I added manually to the FC to hold the new corner coordsinates
###  and the distance measured in each cardinal direction from the tree

#        Index numbers to make it easier to tell what row[#] refers to.
#         [0]   [1]   [2]   [3]   [4]  [5]   [6]   [7]  [8] [9] [10]  [11] [12] [13]
fields = ['X1', 'Y1', 'X2', 'Y2', 'X3','Y3', 'X4', 'Y4','x', 'y', 'n', 's', 'e', 'w']

###  This updatecursor adds/updates the new corner coordinate columns
###   the "- buff" subtracts the buffer value from each new coordinate
###  set to buff=0 above to have straight output without buffer

with arcpy.da.UpdateCursor(infc, fields) as ucursor:
  for row in ucursor: 
      row[0] = row[8] - row[13] - buff
      row[1] = row[9] + row[10] - buff
      row[2] = row[8] + row[12] - buff
      row[3] = row[9] + row[10] - buff
      row[4] = row[8] + row[12] - buff
      row[5] = row[9] - row[11] - buff
      row[6] = row[8] - row[13] - buff
      row[7] = row[9] - row[11] - buff
      ucursor.updateRow(row)  
      
## Fields to establish the search curson on the newly populated input FC.

fields = ['X1', 'Y1', 'X2', 'Y2', 'X3','Y3', 'X4', 'Y4', 'Id','SHAPE@']

## fields for the insert cursor to insert polygons and Id into output FC
##      "SHAPE@" is the geometry column that we insert the polygon into
##       "Id" is the Id column of the input point
##       this way, there is an Id from the respective point in the Polygon
##       you may need to update/add to this if you want other fields copied over

ifields = ['SHAPE@','Id']

## Search cursor inside insert cursor
## Search cursor extracts the new coordinate pairs
## insert cursor inserts the geometry and name ('Id') into the polygon FC

with arcpy.da.InsertCursor(outfc, ifields) as icursor:
    with arcpy.da.SearchCursor(infc,fields) as cursor:
        for s in cursor:
            coords = [(s[0],s[1]),
                      (s[2],s[3]),
                      (s[4],s[5]),
                      (s[6],s[7]),
                      (s[0],s[1])]
            name = s[8]
            icursor.insertRow((coords,name))
            
###  If you set a buffer distance, this will create the buffer to round the corners
            
if buff &amp;gt; 0:
    arcpy.analysis.Buffer(outfc, bufffc, buff, "FULL", "ROUND", "NONE", None, "PLANAR")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 14:57:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/depicting-uneven-tree-crowns/m-p/1154295#M52857</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-03-16T14:57:17Z</dc:date>
    </item>
  </channel>
</rss>

