<?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: Set a coordinate system to &amp;quot;Unknown&amp;quot; with Python in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742288#M24406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Me thinks Freddie is being cruel.... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;so here is what you do&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I am going to demo with a shapefile&lt;UL&gt;&lt;LI&gt;get over it if you don't use shapefiles...they have a *.prj that can be deleted&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;delete the *.prj ... or rename it for the meek and timid&lt;/LI&gt;&lt;LI&gt;get a describe object for the file that has the *.prj deleted&lt;/LI&gt;&lt;LI&gt;get its spatial reference&lt;/LI&gt;&lt;LI&gt;export it to text and see what you get&lt;/LI&gt;&lt;/UL&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; desc = arcpy.Describe(r'f:\test\buff.shp')
&amp;gt;&amp;gt;&amp;gt; SR_unknown = desc.SpatialReference
&amp;gt;&amp;gt;&amp;gt; ancient_text = SR_unknown.exportToString()
&amp;gt;&amp;gt;&amp;gt; print("FYI \n{}".format(ancient_text))
FYI 
{B286C06B-0879-11D2-AACA-00C04FA33C20};341985 5023985 300239975158033;#;#;0.001;#;#;IsHighPrecision
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course yours will be different, but it was an MTM zone 9 originally which the first two numbers are about right for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:35:27 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2021-12-12T07:35:27Z</dc:date>
    <item>
      <title>Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742283#M24401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script tool that creates outputs with unknown coordinate systems. This is as designed. The outputs are profiles, created from an x,y table.&lt;/P&gt;&lt;P&gt;Recently (10.3?), the tool has been failing and that seems to be because ArcMap wants to apply the wgs84 coordinate system by default when none is specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want it to be "Unknown" or "Undefined" both of which fail when I enter them into the MakeXY_Table_management tool:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; arcpy.MakeXYEventLayer_management(proftab,"PROF_X","PROF_Y",profptlyr,"Unknown","#")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This also fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DefineProjection_management(profptlyr,coor_system="Unknown"), although I can enter "Unknown" when I run the DefineProjection tool from the toolbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The coord_system input is considered illegitimate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 16:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742283#M24401</guid>
      <dc:creator>RandyMcGregor</dc:creator>
      <dc:date>2015-11-16T16:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742284#M24402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if there is a way to set the spatial reference to Unknown using the define projection tool. One thing you can do is use python to delete the .prj file for the shapefile. I'm not sure why you would ever want to do this, but that is one way to go about it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 16:37:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742284#M24402</guid>
      <dc:creator>LukeSturtevant</dc:creator>
      <dc:date>2015-11-16T16:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742285#M24403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There was an earlier question (some while ago) here.&lt;/P&gt;&lt;P&gt;Trying to find it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 16:56:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742285#M24403</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2015-11-16T16:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742286#M24404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give this a shot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
unknown = arcpy.SpatialReference()
unknown.loadFromString(u'{B286C06B-0879-11D2-AACA-00C04FA33C20};-450359962737.05 -450359962737.05 10000;#;#;0.001;#;#;IsHighPrecision')
arcpy.MakeXYEventLayer_management(r'C:\Path\To\DATA.csv', 'x_coord', 'y_coord', 'LayerName', unknown)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:35:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742286#M24404</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2021-12-12T07:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742287#M24405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Freddie, brilliant.&lt;/P&gt;&lt;P&gt;As someone said at the time, nothing says Unknown Spatial Reference like..&lt;/P&gt;&lt;P&gt;{B286C06B-0879-11D2-AACA-00C04FA33C20}&lt;/P&gt;&lt;P&gt;Perfectly obvious.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 17:04:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742287#M24405</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2015-11-16T17:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742288#M24406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Me thinks Freddie is being cruel.... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;so here is what you do&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I am going to demo with a shapefile&lt;UL&gt;&lt;LI&gt;get over it if you don't use shapefiles...they have a *.prj that can be deleted&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;delete the *.prj ... or rename it for the meek and timid&lt;/LI&gt;&lt;LI&gt;get a describe object for the file that has the *.prj deleted&lt;/LI&gt;&lt;LI&gt;get its spatial reference&lt;/LI&gt;&lt;LI&gt;export it to text and see what you get&lt;/LI&gt;&lt;/UL&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; desc = arcpy.Describe(r'f:\test\buff.shp')
&amp;gt;&amp;gt;&amp;gt; SR_unknown = desc.SpatialReference
&amp;gt;&amp;gt;&amp;gt; ancient_text = SR_unknown.exportToString()
&amp;gt;&amp;gt;&amp;gt; print("FYI \n{}".format(ancient_text))
FYI 
{B286C06B-0879-11D2-AACA-00C04FA33C20};341985 5023985 300239975158033;#;#;0.001;#;#;IsHighPrecision
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course yours will be different, but it was an MTM zone 9 originally which the first two numbers are about right for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742288#M24406</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T07:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742289#M24407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem with creating an "Unknown/Undefined" spatial reference has been around for years; unfortunately, Esri has made it clear they don't really see it as much of a problem and don't plan on addressing it.&amp;nbsp; For example, see&amp;nbsp; &lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDg3MDMz" rel="nofollow noopener noreferrer" target="_blank"&gt;Bug NIM-087033: Arcpy.DefineProjection_management does not take 'Unknown' as a valid coordinate system&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="font-family: courier new,courier;"&gt;SpatialReference.loadFromString&lt;/SPAN&gt; works, but it relies on passing the Esri internal Class ID/GUID value for the unknown spatial reference.&amp;nbsp; Although that Class ID/GUID has remained the same for many, many years, it is nonetheless an internal value that Esri &lt;SPAN style="text-decoration: underline;"&gt;could&lt;/SPAN&gt; change.&amp;nbsp; My preferred workaround is to create an empty point geometry with no spatial reference, which gets turned into the unknown spatial reference, and then pass that into a variable:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; SR = arcpy.FromWKT('POINT EMPTY').spatialReference
&amp;gt;&amp;gt;&amp;gt; #which can be seen to use Unknown/Undefined spatial reference
&amp;gt;&amp;gt;&amp;gt; SR.exportToString()

u'{B286C06B-0879-11D2-AACA-00C04FA33C20};-450359962737.05 -450359962737.05 10000;#;#;0.001;#;#;IsHighPrecision'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742289#M24407</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T07:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742290#M24408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or like mine below...&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 18:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742290#M24408</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-16T18:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742291#M24409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One problem I run into trying to reply during the day, I get distracted and my responses get drawn out, so other responses come in before I hit reply.&amp;nbsp; I wish comments could be easily saved as draft and revisited later.&amp;nbsp; Although there is auto-saving, I have run into cases where I lost content, and copying and pasting the content/html back and forth to the clipboard is such a hassle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 18:49:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742291#M24409</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-11-16T18:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742292#M24410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, that did it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just like that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 19:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742292#M24410</guid>
      <dc:creator>RandyMcGregor</dc:creator>
      <dc:date>2015-11-16T19:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set a coordinate system to "Unknown" with Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742293#M24411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like this as a way around the possibility that ESRI might change that horrible GUID thingamajigger.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 19:21:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-a-coordinate-system-to-quot-unknown-quot-with/m-p/742293#M24411</guid>
      <dc:creator>RandyMcGregor</dc:creator>
      <dc:date>2015-11-16T19:21:10Z</dc:date>
    </item>
  </channel>
</rss>

