<?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 Projecting single point in arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/projecting-single-point-in-arcpy/m-p/1138121#M63604</link>
    <description>&lt;P&gt;I have a script that takes in lot, long values (in decimal degrees) and determines whether the points are contained within a polygon in another feature class.&amp;nbsp; I assume I have to create a point object and get it into the same coordinate system as the polygon, but the projection comes back empty (no points).&amp;nbsp; I don't fully understand all the ins and outs of projections so hopefully I'm doing something obviously incorrect here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;x = -88.155675
y = 43.223869
f_cs = 'WGS 1984 Web Mercator (auxiliary sphere)'
t_cs = 'NAD 1983 UTM Zone 16N'
xform = 'WGS_1984_(ITRF00)_To_NAD_1983'
pt = arcpy.Point(x,y)
pg = arcpy.PointGeometry(pt, arcpy.SpatialReference(f_cs))
pgp = pg.projectAs(t_cs, xform)
print (pgp.firstPoint)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 21:18:03 GMT</pubDate>
    <dc:creator>DonMorrison1</dc:creator>
    <dc:date>2022-01-27T21:18:03Z</dc:date>
    <item>
      <title>Projecting single point in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/projecting-single-point-in-arcpy/m-p/1138121#M63604</link>
      <description>&lt;P&gt;I have a script that takes in lot, long values (in decimal degrees) and determines whether the points are contained within a polygon in another feature class.&amp;nbsp; I assume I have to create a point object and get it into the same coordinate system as the polygon, but the projection comes back empty (no points).&amp;nbsp; I don't fully understand all the ins and outs of projections so hopefully I'm doing something obviously incorrect here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;x = -88.155675
y = 43.223869
f_cs = 'WGS 1984 Web Mercator (auxiliary sphere)'
t_cs = 'NAD 1983 UTM Zone 16N'
xform = 'WGS_1984_(ITRF00)_To_NAD_1983'
pt = arcpy.Point(x,y)
pg = arcpy.PointGeometry(pt, arcpy.SpatialReference(f_cs))
pgp = pg.projectAs(t_cs, xform)
print (pgp.firstPoint)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 21:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/projecting-single-point-in-arcpy/m-p/1138121#M63604</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2022-01-27T21:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting single point in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/projecting-single-point-in-arcpy/m-p/1138149#M63605</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you x, y aren't in web mercator,&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;x = -88.155675
y = 43.223869
sr = arcpy.SpatialReference(4326)
t_cs = 'NAD 1983 UTM Zone 16N'
xform = 'WGS_1984_(ITRF00)_To_NAD_1983'
pt = arcpy.Point(x,y)
pg = arcpy.PointGeometry(pt, sr)
srto = arcpy.SpatialReference('NAD 1983 UTM Zone 16N')
pgp = pg.projectAs(srto, xform)

pgp.firstPoint
&amp;lt;Point (406145.6122366393, 4786322.940660958, #, #)&amp;gt;

pt
&amp;lt;Point (-88.155675, 43.223869, #, #)&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;seems to work&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 22:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/projecting-single-point-in-arcpy/m-p/1138149#M63605</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-27T22:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting single point in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/projecting-single-point-in-arcpy/m-p/1138179#M63608</link>
      <description>&lt;P&gt;That's it! I must have tried a hundred combinations and at some point I was using 4326 but must have had something else off at that point.&amp;nbsp; Thanks Dan!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 23:02:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/projecting-single-point-in-arcpy/m-p/1138179#M63608</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2022-01-27T23:02:56Z</dc:date>
    </item>
  </channel>
</rss>

