<?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 Define coordinate system for TINs using arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/define-coordinate-system-for-tins-using-arcpy/m-p/75102#M6129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcGIS 10.0 SP2 Build 3200, Windows 7, 64bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 1: Using arcpy, how do I get the current coordinate system of a TIN?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 2: Using arcpy, how do I set the coordinate system of a TIN?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a zillion TINs all without a defined geographic coordinate system. I need to loop over each TIN and define the coordinate system to be WGS84 and I can't seem to find the magic in arcpy to accomplish this. I can set the coordinate system to WGS84 through the GUI one at a time, I should live so long as to accomplish this using the GUI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error I get is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;000289 : Failed to alter spatial reference.&lt;BR /&gt;ArcGIS 10 &lt;BR /&gt;Description&lt;BR /&gt;The spatial reference of the dataset cannot be altered. The dataset may be in use by another application and therefore locked.&lt;BR /&gt;&lt;BR /&gt;Solution&lt;BR /&gt;Ensure that the dataset is not read-only or being locked by another application or user&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The data set is not open as near as I can tell.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the script as would work on a single TIN:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
# coordinateSystem = "C:/Program Files (x86)/ArcGIS/Desktop10.0/Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"
coordinateSystem = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
tin = "habop-1999-04-avgcombinedSVT"
wdir = "c:/path/TINS"
arcpy.env.workspace = wdir
desc = arcpy.Describe(tin)
try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; d = arcpy.DefineProjection_management(tin, coordinateSystem)
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print tin+" conversion no good."&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a heap in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--Paul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:54:45 GMT</pubDate>
    <dc:creator>PaulTurner</dc:creator>
    <dc:date>2021-12-10T22:54:45Z</dc:date>
    <item>
      <title>Define coordinate system for TINs using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/define-coordinate-system-for-tins-using-arcpy/m-p/75102#M6129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcGIS 10.0 SP2 Build 3200, Windows 7, 64bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 1: Using arcpy, how do I get the current coordinate system of a TIN?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 2: Using arcpy, how do I set the coordinate system of a TIN?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a zillion TINs all without a defined geographic coordinate system. I need to loop over each TIN and define the coordinate system to be WGS84 and I can't seem to find the magic in arcpy to accomplish this. I can set the coordinate system to WGS84 through the GUI one at a time, I should live so long as to accomplish this using the GUI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error I get is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;000289 : Failed to alter spatial reference.&lt;BR /&gt;ArcGIS 10 &lt;BR /&gt;Description&lt;BR /&gt;The spatial reference of the dataset cannot be altered. The dataset may be in use by another application and therefore locked.&lt;BR /&gt;&lt;BR /&gt;Solution&lt;BR /&gt;Ensure that the dataset is not read-only or being locked by another application or user&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The data set is not open as near as I can tell.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the script as would work on a single TIN:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
# coordinateSystem = "C:/Program Files (x86)/ArcGIS/Desktop10.0/Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"
coordinateSystem = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
tin = "habop-1999-04-avgcombinedSVT"
wdir = "c:/path/TINS"
arcpy.env.workspace = wdir
desc = arcpy.Describe(tin)
try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; d = arcpy.DefineProjection_management(tin, coordinateSystem)
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print tin+" conversion no good."&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a heap in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--Paul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:54:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/define-coordinate-system-for-tins-using-arcpy/m-p/75102#M6129</guid>
      <dc:creator>PaulTurner</dc:creator>
      <dc:date>2021-12-10T22:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Define coordinate system for TINs using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/define-coordinate-system-for-tins-using-arcpy/m-p/75103#M6130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See workaround (Python code):&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/63054-define-projection-fails-on-a-tin-dataset?sr=search&amp;amp;searchId=bc68cc20-8698-4131-8acc-9f4d64f60b47&amp;amp;searchIndex=0"&gt;https://community.esri.com/message/63054-define-projection-fails-on-a-tin-dataset?sr=search&amp;amp;searchId=bc68cc20-8698-4131-8acc-9f4d64f60b47&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 23:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/define-coordinate-system-for-tins-using-arcpy/m-p/75103#M6130</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2017-05-03T23:18:16Z</dc:date>
    </item>
  </channel>
</rss>

