<?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: Python Calculate Latitude Longitude based on offsets in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388834#M30742</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your SQL database spatially enabled (SDE installed)?&amp;nbsp; Or was the table created within SQL Server, and the database is not spatially enabled?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2012 13:33:12 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2012-07-09T13:33:12Z</dc:date>
    <item>
      <title>Python Calculate Latitude Longitude based on offsets</title>
      <link>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388831#M30739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have a script that will take a latitude and longitude value in decimal degrees and calculate a new latitude and longitude value, based on moving from the given lat/long east 350 ft and south 750 feet for example?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 16:58:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388831#M30739</guid>
      <dc:creator>JamesCunningham1</dc:creator>
      <dc:date>2012-07-03T16:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python Calculate Latitude Longitude based on offsets</title>
      <link>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388832#M30740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you reading the lat/long values from a feature class?&amp;nbsp; If you are using a Search or Update cursor you can specify a spatial reference that uses feet, rather than decimal degrees, and the coordinates will be projected on the fly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 18:13:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388832#M30740</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-07-03T18:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python Calculate Latitude Longitude based on offsets</title>
      <link>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388833#M30741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The calculations need to be outside of ArcMap.&amp;nbsp; Maybe I am thinking of this incorrectly.&amp;nbsp; I now believe the calculations will need to be in something such as SQL.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 10:36:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388833#M30741</guid>
      <dc:creator>JamesCunningham1</dc:creator>
      <dc:date>2012-07-09T10:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python Calculate Latitude Longitude based on offsets</title>
      <link>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388834#M30742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your SQL database spatially enabled (SDE installed)?&amp;nbsp; Or was the table created within SQL Server, and the database is not spatially enabled?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 13:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388834#M30742</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-07-09T13:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python Calculate Latitude Longitude based on offsets</title>
      <link>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388835#M30743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't have a python example, however, I did it in ArcObjects several years ago. The procedure below should be a reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did it without using ArcGIS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First just load the original data (Decimal degree) into a table in database &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The trick is to create a point shape file (or sde FC) by selecting the projected coordinate system you want. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then read each lat/long pair data to your shape file (create each points)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think Python can use ArcGIS database management to do all above.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 16:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388835#M30743</guid>
      <dc:creator>SteveXu</dc:creator>
      <dc:date>2012-07-09T16:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python Calculate Latitude Longitude based on offsets</title>
      <link>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388836#M30744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is an example on how to create an XY event layer from your SQL table and then reproject the coordinates from decimal degrees to feet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
env.workspace = r"Database Connections\PUBS.sde"

table = "pubs.dbo.XY"

arcpy.MakeXYEventLayer_management(table, "X", "Y", "XY_layer", r"C:\data\test.gdb\Airports_WGS84")


rows = arcpy.SearchCursor("XY_layer", "", r"C:\data\test.gdb\Airports_NAD83_feet")
for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print row.shape.centroid.X, row.shape.centroid.Y

del row, rows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The XY event layer is created with the same coordinate system as the Airports_WGS84 feature class.&amp;nbsp; In this case it is geographic.&amp;nbsp; Then, the XY coordinates are returned based off of a NAD83_feet coordinate system using the SearchCursor function and printed out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are looking to update the SQL table with these values, SDE will need to be installed and the table will need to be registered with the geodatabse.&amp;nbsp; You can then use the 'UpdateCursor' to update new fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-calculate-latitude-longitude-based-on/m-p/388836#M30744</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T17:51:16Z</dc:date>
    </item>
  </channel>
</rss>

