<?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: Create segment of circle based on point and attribute for radius? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1163621#M53928</link>
    <description>&lt;P&gt;glad it worked out!&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2022 18:36:01 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-04-12T18:36:01Z</dc:date>
    <item>
      <title>Create segment of circle based on point and attribute for radius?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1161844#M53733</link>
      <description>&lt;P&gt;Can anyone suggest a python snippet that could generate a segment of a circle, with the cetnre of the circle defined by a point feature class, and the radius of the segment based on an attribute from the point?&lt;/P&gt;&lt;P&gt;The segment angle can be hard coded, and based on a segment that subtends&amp;nbsp; northwest through to due east.&lt;/P&gt;&lt;P&gt;The reason for this script, is to generate indicative shadow areas for trees, with the radius based on the tree's max height value.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 21:02:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1161844#M53733</guid>
      <dc:creator>David_Brooks</dc:creator>
      <dc:date>2022-04-06T21:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create segment of circle based on point and attribute for radius?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1161862#M53739</link>
      <description>&lt;P&gt;sector code&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def _arc_sector(radius=100, start=0, stop=1, step=0.1, xc=0.0, yc=0.0):
    """Create an arc from a specified radius, centre and start/stop angles

    Requires:
    ---------
    `radius` : number
        cirle radius from which the arc is obtained
    `start`, `stop`, `step` : numbers
        angles in degrees
    `xc`, `yc` : number
        center coordinates in projected units

    Returns:
    --------
      points on the arc
    """
    start, stop = sorted([start, stop])
    angle = np.deg2rad(np.arange(start, stop, step))
    x_s = radius*np.cos(angle)         # X values
    y_s = radius*np.sin(angle)         # Y values
    pnts = np.c_[x_s, y_s]
    cent = np.array([xc, yc])
    pnts = pnts + cent
    sector = np.concatenate((cent[None, :], pnts, cent[None, :]), axis=0)
    return sector&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sector.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38281iE6F720A98B95CDAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sector.png" alt="sector.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;example call, it returns a numpy array.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a = _arc_sector(radius=100, start=20, stop=70, step=1, xc=0.0, yc=0.0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;angle from 20 to 70 (relative to N over 0 to 360) in 1 degree steps with center xc, yc)&lt;/P&gt;&lt;P&gt;If you need a list&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a_list = a.tolist()&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 21:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1161862#M53739</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-04-06T21:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create segment of circle based on point and attribute for radius?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1163382#M53902</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;great thank you. So if it generates a numpy array of points, i can use the following to generate a polygon:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;a_list = array.tolist()

# Create a feature class with a spatial reference of OSGB1936
result = arcpy.management.CreateFeatureclass(r'&amp;lt;GDBLocn&amp;gt;',
                                             "TestShadow", "POLYGON", spatial_reference=27700)
feature_class = result[0]

# Write feature to new feature class
with arcpy.da.InsertCursor(feature_class, ['SHAPE@']) as cursor:
    cursor.insertRow([a_list])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;worked a treat. you're a star &lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 10:18:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1163382#M53902</guid>
      <dc:creator>David_Brooks</dc:creator>
      <dc:date>2022-04-12T10:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create segment of circle based on point and attribute for radius?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1163621#M53928</link>
      <description>&lt;P&gt;glad it worked out!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 18:36:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-segment-of-circle-based-on-point-and/m-p/1163621#M53928</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-04-12T18:36:01Z</dc:date>
    </item>
  </channel>
</rss>

