<?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: Path to .prj files in ArcGIS v10.1? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503390#M39535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jason - That did work...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; srList = arcpy.ListSpatialReferences("*washington*south*", "PCS")
&amp;gt;&amp;gt;&amp;gt; for sr in srList:
...&amp;nbsp; print sr
Projected Coordinate Systems/State Plane/NAD 1927 (US Feet)/NAD 1927 StatePlane Washington South FIPS 4602
Projected Coordinate Systems/State Plane/NAD 1983 (CORS96) (Meters)/NAD 1983 (CORS96) StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 (CORS96) (US Feet)/NAD 1983 (CORS96) StatePlane Washington South FIPS 4602 (US Feet)
Projected Coordinate Systems/State Plane/NAD 1983 (Meters)/NAD 1983 StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 (US Feet)/NAD 1983 StatePlane Washington South FIPS 4602 (US Feet)
Projected Coordinate Systems/State Plane/NAD 1983 HARN (Meters)/NAD 1983 HARN StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 HARN (US Feet)/NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet)
Projected Coordinate Systems/State Plane/NAD 1983 NSRS2007 (Meters)/NAD 1983 NSRS2007 StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 NSRS2007 (US Feet)/NAD 1983 NSRS2007 StatePlane Washington South FIPS 4602 (US Feet)
&amp;gt;&amp;gt;&amp;gt; arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(srList[6])
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This also works (not sure what I was doing wrong before):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.env.outputCoordinateSystem = arcpy.SpatialReference('NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet)')&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:05:01 GMT</pubDate>
    <dc:creator>ChrisSnyder</dc:creator>
    <dc:date>2021-12-11T22:05:01Z</dc:date>
    <item>
      <title>Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503385#M39530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In v10.0 and before there was always a folder that contained all the ESRI .prj definition files... Usually something like C:\Program Files\ArcGIS\Desktop10.0\Coordinate Systems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe I messed up my install somehow, but now in v10.1 it seems that 'Coordinate Systems' folder is no longer there, and to boot, there are no .prj files at all in the ArcGIS Program Files directory... at all!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I always used the .prj files to set the arcpy.env.outputCoordinateSystem variable (and all its various past incarnations).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What gives? How can we now access the official ESRI projection definitions in a script if there are no .prj definition file anymore?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The help says you can use .prj files, and the provided example in the arcpy.env.outputCoordinateSystem help topic yields:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.env.outputCoordinateSystem = "Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 18N.prj"
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;interactive input&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 515, in set_
&amp;nbsp;&amp;nbsp;&amp;nbsp; self[env] = val
&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 567, in __setitem__
&amp;nbsp;&amp;nbsp;&amp;nbsp; ret_ = setattr(self._gp, item, value)
RuntimeError: Object: Error in accessing environment &amp;lt;outputCoordinateSystem&amp;gt;&lt;/PRE&gt;&lt;SPAN&gt;Am I totally missing something?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:33:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503385#M39530</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-12T16:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503386#M39531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Kim...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/43644-UTM-Conversion-in-Python?p=222580&amp;amp;viewfull=1#post222580"&gt;http://forums.arcgis.com/threads/43644-UTM-Conversion-in-Python?p=222580&amp;amp;viewfull=1#post222580&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good ole' .prj... you will be missed!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 23:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503386#M39531</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-08-08T23:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503387#M39532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well that throws a wrench in things, thanks for posting this so I have time to make some much needed changes before I even start the switch over to 10.1. How does this impact the project tool?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 10.0 I would do essentially something like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
outCS = os.path.join(installDir,r"Coordinate Systems\Projected Coordinate Systems\National Grids\Canada\NAD 1983 CSRS UTM Zone 12N.prj")
inCS = os.path.join(installDir,r"Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj")

arcpy.Project_management(in_fc, out_feature, outCS, transform_method, inCS)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 10.1 would look like this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;inCS = arcpy.SpatialReference()
inCS.factoryCode = some_code1
inCS.create()

outCS = arcpy.SpatialReference()
outCS.factoryCode = some_code2
outCS.create()

arcpy.Project_management(in_fc, out_feature, outCS, transform_method, inCS)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:04:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503387#M39532</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-11T22:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503388#M39533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ya - i guess that's how it would work via scripting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sure is a pain to find the "codes" since the .pdf is not well structured like the Coordinate Systems directory tree.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Only way I could find the right code was by using v10.0, getting the sr object, and spitting out the "factory code" such as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.outputCoordinateSystem = r"C:\Program Files\ArcGIS\Desktop10.0\Coordinate Systems\Projected Coordinate Systems\State Plane\NAD 1983 HARN (US Feet)\NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet).prj"
&amp;gt;&amp;gt;&amp;gt; arcpy.env.outputCoordinateSystem.factoryCode
2927 &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, my new syntax in v10.1 is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.env.outputCoordinateSystem = 2927 #WA_SPS_NAD83HARN_USFEET&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that (contrary to the Help topic) this syntax DOES NOT appear to work for me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.outputCoordinateSystem = arcpy.SpatialReference('NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet')Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;interactive input&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 505, in set_
&amp;nbsp;&amp;nbsp;&amp;nbsp; self[env] = val
&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 557, in __setitem__
&amp;nbsp;&amp;nbsp;&amp;nbsp; ret_ = setattr(self._gp, item, value)
RuntimeError: &amp;lt;unprintable RuntimeError object&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note sure why the .prj files went away... Dawning of a new age of fully integrated seamless geospatial technology I guess... Sigh...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;COMPLAINT TO ESRI:&lt;/STRONG&gt;&lt;SPAN&gt;The v10.1 Help topics that cover to projection-related stuff via Python scripting could use some further explanation about the new code/name based syntax. Script example syntax relating to using spatial reference names to set the SR appears to be incorrect.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:33:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503388#M39533</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-12T16:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503389#M39534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can find the correct string for the spatial reference you want to create with &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018v00000010000000"&gt;arcpy.ListSpatialReferences&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 15:49:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503389#M39534</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2012-08-09T15:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503390#M39535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jason - That did work...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; srList = arcpy.ListSpatialReferences("*washington*south*", "PCS")
&amp;gt;&amp;gt;&amp;gt; for sr in srList:
...&amp;nbsp; print sr
Projected Coordinate Systems/State Plane/NAD 1927 (US Feet)/NAD 1927 StatePlane Washington South FIPS 4602
Projected Coordinate Systems/State Plane/NAD 1983 (CORS96) (Meters)/NAD 1983 (CORS96) StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 (CORS96) (US Feet)/NAD 1983 (CORS96) StatePlane Washington South FIPS 4602 (US Feet)
Projected Coordinate Systems/State Plane/NAD 1983 (Meters)/NAD 1983 StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 (US Feet)/NAD 1983 StatePlane Washington South FIPS 4602 (US Feet)
Projected Coordinate Systems/State Plane/NAD 1983 HARN (Meters)/NAD 1983 HARN StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 HARN (US Feet)/NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet)
Projected Coordinate Systems/State Plane/NAD 1983 NSRS2007 (Meters)/NAD 1983 NSRS2007 StatePlane Washington South FIPS 4602 (Meters)
Projected Coordinate Systems/State Plane/NAD 1983 NSRS2007 (US Feet)/NAD 1983 NSRS2007 StatePlane Washington South FIPS 4602 (US Feet)
&amp;gt;&amp;gt;&amp;gt; arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(srList[6])
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This also works (not sure what I was doing wrong before):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.env.outputCoordinateSystem = arcpy.SpatialReference('NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet)')&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503390#M39535</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T22:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503391#M39536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh see what's different...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "sR.name" property appears to be slightly different than the "official" syntax compliant name that uis given by the arcpy.ListSpatialReferences() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any sR property that yields the "syntax compliant" name?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sR.name property of 'NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;compliant name of 'NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet)'&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 16:39:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503391#M39536</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-08-09T16:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503392#M39537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Phew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am so glad I stumbled across this little gem. I was about to upgrade my system to 10.1 this w/end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I am not so sure....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The old directory system of *.prj files worked and was quite flexible. ie It was easy to create a new prj for a particular project, say a custom crafted UTM like system (ie with a non-standard central meridian). Now what do you do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It was also useful to browse the directories when searching for obscure projection info for certain regions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why make this info harder to find? And use. Oh and Yes, I can also memorise all xx thousand "factory codes"....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Miffed,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 11:59:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503392#M39537</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2012-08-10T11:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503393#M39538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;The old directory system of *.prj files worked and was quite flexible. ie It was easy to create a new prj for a particular project, say a custom crafted UTM like system (ie with a non-standard central meridian). Now what do you do?&lt;BR /&gt;It was also useful to browse the directories when searching for obscure projection info for certain regions.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We've tried to make it much easier to search for coordinate systems. If you're working in the desktop apps, you can search on a text string (if you only know a fragment of the coordinate system's name), or apply a spatial filter to reduce the list to only those coordinate systems applicable to the map's extent. Once you've found that obscure coordinate system, you can add it to your Favorites and never have to search for it again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 14:11:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503393#M39538</guid>
      <dc:creator>PeterYurkosky1</dc:creator>
      <dc:date>2012-08-10T14:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503394#M39539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Many (most/all?) of the scripting users were accustomed to using the file-based .prj definitions. Some issues I see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. The SR properties .name, .PCSName and/or .GCSName do not necessarily match the allowable spatial reference token keywords�?� For example the factory code of 2927 (the projection for all WA State Govt. agencies) has a .name and .PCSName property of 'NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet', however the spatial reference token keyword is actually 'NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet)'. So the effect of this issue is that this works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.outputCoordinateSystem = arcpy.SpatialReference('NAD 1983 HARN StatePlane Washington South FIPS 4602 (US Feet)')&lt;/PRE&gt;&lt;SPAN&gt;and this DOES NOT work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.outputCoordinateSystem = arcpy.SpatialReference('NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet')&lt;/PRE&gt;&lt;SPAN&gt;Perhaps my projection (WA SPS NAD83HARN USFEET) is the exception here, but it would be nice to have a SR property that would yield the correct sr token keyword.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. The Help system topics (Project tool, Project Raster tool, arcpy.env.outputCoordinateSystem, etc) do not adequately describe the disappearance of the file-based .prj files and it's impact on script-based use of the geoprocessing tools, nor does it describe the proper syntax of the factory codes (or how to search for them in projected coordinate systems .pdf reference doc), fails to mention the arcpy.ListSpatialReferences() method, and fails to mention a way to retrieve the proper sr token keywords. Also, script examples for the arcpy.env.outputCoordinateSystem method have the wrong syntax for using the spatial reference token keywords (Help provided example of arcpy.env.outputCoordinateSystem = "Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 18N.prj" results in an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. There are no file-based .prj files anymore. This threw me for a big loop! I suppose you can make some with the .exportToString() method, but that's kinda a pain... Seems like some of the legacy tools such as Project Coverage required .prj files... Not sure why the help system mentions .prj files anymore if there aren't any to speak of!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I liked the .prj file folders because they were easy to search... Other than the directory tree in the the coordinate system parameter GUI in the projection-related toolbox tools, I don't really see an easy way to browse and retrieve the factory codes or SR token keywords (&lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;which you now need to reference when specifying coordinate systems in a script&lt;/SPAN&gt;&lt;SPAN&gt;).&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Getting rid of the file-based .prj definitions is a pretty big change... Like everything else though I'm sure we'll all get used to it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 16:12:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503394#M39539</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-08-10T16:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503395#M39540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By way of suggestions for a workaround:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Keep in mind that you can still export coordinate systems to .prj files in the dialog (right click the coordinate system in the treeview and select Save As...). &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;You can also get the factory code in the same dialog (and avoid searching through that .pdf file). It's shown as the "WKID" in the large text box at the bottom.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 18:04:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503395#M39540</guid>
      <dc:creator>PeterYurkosky1</dc:creator>
      <dc:date>2012-08-10T18:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503396#M39541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay Pete,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I havn't yet upgraded my system, is there a way to select a coordinate system, modify it then "Save As"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But this is quite a change and I agree with the comments above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;N&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 09:57:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503396#M39541</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2012-08-13T09:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503397#M39542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;is there a way to select a coordinate system, modify it then "Save As"?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, just right-click the coordinate system in the tree-view and select Copy and Modify. This will create a new coordinate system that will appear under a "Custom" category. Then either add it to your "Favorites" (which creates a .prj file in your %APPDATA% folder) or select Save As to put it wherever you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, the software still reads and honors .prj files, but they're no longer the mechanism for deploying the 4000+ coordinate systems included with ArcGIS.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 13:26:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503397#M39542</guid>
      <dc:creator>PeterYurkosky1</dc:creator>
      <dc:date>2012-08-13T13:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Path to .prj files in ArcGIS v10.1?</title>
      <link>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503398#M39543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This may be a little late to post here, but I followed up on Chris Snyder's suggestion (post #10) to write the prj file using the exportToString() method.&amp;nbsp; I didn't find it posted anywhere else and it's simple, so here it is (below).&amp;nbsp; The topic came up again yesterday with a post by Janet Brewster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This script version simply writes a single file...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- gets the SR object from an input dataset and exports it to string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- replaces single quotes with double quotes in the string (mine was rejected when I tried to use it with 10.0; was accepted as the coord sys param by tools such as Create Feature Class after replacing the quotes).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- writes the result to a text file (use a prj extension).&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# define a few variables 1st:
dataset = r'&amp;lt; fc or shp pathname you want to create prj from &amp;gt;'
outFile = r'&amp;lt; text file pathname you want to write to (make sure to use prj ext) &amp;gt;'

print 'executing...please wait.\n'
import arcpy, time

# get Spatial Reference object
SR = arcpy.Describe(dataset).spatialReference

# get the string from the object
seeString = SR.exportToString()

# Testing w/ system ArcGIS tools at 10.0 rejected the string - the problem:&amp;nbsp; single quotes, simply replace with double quotes:
seeString = seeString.replace('\'', '\"')

# let's see it...
print 'This is the string after replacing single quotes, if any found:\n'
print seeString + '\n'

# write it and use it!
writeTo = open(outFile, 'wb')
writeTo.writelines(seeString)
writeTo.close()

print 'done.&amp;nbsp; ...check your new prj file in the directory you defined.'
time.sleep(5)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/path-to-prj-files-in-arcgis-v10-1/m-p/503398#M39543</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T22:05:03Z</dc:date>
    </item>
  </channel>
</rss>

