<?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: Calculating point based and start point, distance and angle in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calculating-point-based-and-start-point-distance/m-p/1229516#M67794</link>
    <description>&lt;P&gt;For that, you have to use&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/pointgeometry.htm" target="_blank" rel="noopener"&gt;PointGeometry&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# what you have
coordinates = (57.6222951, 18.8333582)
sr = 4326
# what you want
bearing = 345
distance = 2000
target_sr = 3006

# create a point geometry from the given coordinates and project it into the target coordinate system
y, x = coordinates
p = arcpy.PointGeometry(arcpy.Point(x, y), arcpy.SpatialReference(sr))
p_proj = p.projectAs(arcpy.SpatialReference(target_sr))

# get the target point geometry
p_target = p_proj.pointFromAngleAndDistance(bearing, distance)

# print coordinates
p_target.firstPoint
#&amp;lt;Point (728268.6981234621, 6395030.819025804, #, #)&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 14:41:27 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-11-08T14:41:27Z</dc:date>
    <item>
      <title>Calculating point based and start point, distance and angle</title>
      <link>https://community.esri.com/t5/python-questions/calculating-point-based-and-start-point-distance/m-p/1229488#M67793</link>
      <description>&lt;P&gt;I have a point, and based on this point, a certain distance and a bearing I want to calculate the resulting coordinates. And I was wondering how to do this in arcpy, while the spatial reference system is honored.&lt;/P&gt;&lt;P&gt;Lets say I am in EPSG 3006, have an arbitrary point (57.6222951N,18.8333582E), a distance of 2000 meter, and a bearing of 345 degree...&lt;/P&gt;&lt;P&gt;How can I achieve that with arcpy?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 13:25:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculating-point-based-and-start-point-distance/m-p/1229488#M67793</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2022-11-08T13:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating point based and start point, distance and angle</title>
      <link>https://community.esri.com/t5/python-questions/calculating-point-based-and-start-point-distance/m-p/1229516#M67794</link>
      <description>&lt;P&gt;For that, you have to use&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/pointgeometry.htm" target="_blank" rel="noopener"&gt;PointGeometry&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# what you have
coordinates = (57.6222951, 18.8333582)
sr = 4326
# what you want
bearing = 345
distance = 2000
target_sr = 3006

# create a point geometry from the given coordinates and project it into the target coordinate system
y, x = coordinates
p = arcpy.PointGeometry(arcpy.Point(x, y), arcpy.SpatialReference(sr))
p_proj = p.projectAs(arcpy.SpatialReference(target_sr))

# get the target point geometry
p_target = p_proj.pointFromAngleAndDistance(bearing, distance)

# print coordinates
p_target.firstPoint
#&amp;lt;Point (728268.6981234621, 6395030.819025804, #, #)&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 14:41:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculating-point-based-and-start-point-distance/m-p/1229516#M67794</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-11-08T14:41:27Z</dc:date>
    </item>
  </channel>
</rss>

