<?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>idea Define point from array in Python Ideas</title>
    <link>https://community.esri.com/t5/python-ideas/define-point-from-array/idi-p/1343932</link>
    <description>&lt;P&gt;In a separate question (&lt;A href="https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343655/highlight/true#M8660" target="_self"&gt;Create NIL (zero vertex) geometry&lt;/A&gt;),&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;mentioned:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;I can only wish points could just be defined from arrays&lt;/P&gt;&lt;P&gt;np.full(shape=(4,), fill_value=np.nan, order='C')&lt;BR /&gt;array([nan, nan, nan, nan])&lt;BR /&gt;# -- or&lt;BR /&gt;np.empty((0,))&lt;BR /&gt;array([], dtype=float64)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;ArcPy isn't my area of expertise. But it seems like an interesting idea.&amp;nbsp; Could ArcPy be enhanced so that&amp;nbsp;points can be defined from arrays?&lt;/P&gt;&lt;P&gt;Dan, feel free to clarify.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 15:55:51 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2023-10-31T15:55:51Z</dc:date>
    <item>
      <title>Define point from array</title>
      <link>https://community.esri.com/t5/python-ideas/define-point-from-array/idi-p/1343932</link>
      <description>&lt;P&gt;In a separate question (&lt;A href="https://community.esri.com/t5/geodatabase-questions/create-nil-zero-vertex-geometry/m-p/1343655/highlight/true#M8660" target="_self"&gt;Create NIL (zero vertex) geometry&lt;/A&gt;),&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;mentioned:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;I can only wish points could just be defined from arrays&lt;/P&gt;&lt;P&gt;np.full(shape=(4,), fill_value=np.nan, order='C')&lt;BR /&gt;array([nan, nan, nan, nan])&lt;BR /&gt;# -- or&lt;BR /&gt;np.empty((0,))&lt;BR /&gt;array([], dtype=float64)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;ArcPy isn't my area of expertise. But it seems like an interesting idea.&amp;nbsp; Could ArcPy be enhanced so that&amp;nbsp;points can be defined from arrays?&lt;/P&gt;&lt;P&gt;Dan, feel free to clarify.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 15:55:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/define-point-from-array/idi-p/1343932</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-10-31T15:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Define point from array</title>
      <link>https://community.esri.com/t5/python-ideas/define-point-from-array/idc-p/1344151#M253</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/351335"&gt;@Bud&lt;/a&gt;&amp;nbsp;, you sort of can.&amp;nbsp; I create a polygon from four lat./long. coordinates.&amp;nbsp; I collect four sets of coordinates from emails for marking utilities.&amp;nbsp; I think that the array is actually a list, but in this instance it works like an array.&amp;nbsp; After this portion of code, I use an UpdateCursor to add attributes to the new polygon in a feature-class.&amp;nbsp; FYI, I'm still on Pro 2.9, so I'm using arcpy version 2.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fc = r"C:\myPython.gdb\AZ811_BlueStake"
iCursor = arcpy.da.InsertCursor(fc, ["SHAPE@"])
array = arcpy.Array([arcpy.Point(lonX_NW, latY_NW),
                     arcpy.Point(lonX_NE, latY_NE),
                     arcpy.Point(lonX_SE, latY_SE),
                     arcpy.Point(lonX_SW, latY_SW)])
# Spatial reference set to GCS_WGS_1984
spatial_reference = arcpy.SpatialReference(4326)
polygon = arcpy.Polygon(array, spatial_reference)
iCursor.insertRow([polygon])
del iCursor&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 21:07:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/define-point-from-array/idc-p/1344151#M253</guid>
      <dc:creator>Shauna-RaeBrown</dc:creator>
      <dc:date>2023-10-31T21:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Define point from array</title>
      <link>https://community.esri.com/t5/python-ideas/define-point-from-array/idc-p/1344204#M254</link>
      <description>&lt;P&gt;It is the excessive arcpy.Point to create an arcpy.Array.&amp;nbsp; It has few properties and methods that can't be handled with an array (of some type, eg numpy, etc) of doubles.&amp;nbsp; Everything in geometry goes back to arcobjects, which has been written a long time ago and making serious changes would be highly unlikely.&lt;/P&gt;&lt;P&gt;There is always the arcgis module, or roll out your own geometry module to interface with arcpy, as I did.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 23:01:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/define-point-from-array/idc-p/1344204#M254</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-10-31T23:01:00Z</dc:date>
    </item>
  </channel>
</rss>

