<?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: Problem with Describe.spatialReference in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-with-describe-spatialreference/m-p/562490#M43989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;HI Andrew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unfortunately I think the Errormessage just uses the word "DescribeData", but my script uses the describe object in the right way. As I wrote in my first threat, when the script runs as stand-alone everything is fine. I am using the geoprocessor 9.3 an the code looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;describe = gp.Describe(raster) &lt;BR /&gt;if describe.SpatialReference.name == "Unknown":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.DefineProjection_management(raster, inputcoord)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I don't know why but it seems to me that the script works now also from the ArcToolbox. Maybe it was just another example of "Reboot your system and everything is fine again".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Feb 2011 05:19:34 GMT</pubDate>
    <dc:creator>MartinRick</dc:creator>
    <dc:date>2011-02-04T05:19:34Z</dc:date>
    <item>
      <title>Problem with Describe.spatialReference</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-describe-spatialreference/m-p/562488#M43987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;currently I am working on a script that automatically converts a chosen raster dataset into a GeoTiff and projects it to wgs84 if it is not already uses this coordinate system. Therefore I have to read the spatial reference of my input dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to do this by using the Describe object. The script works just fine as stand-alone application, but when I try to include it to my Toolbox in ArcGis Desktop 10 I get an error Message which says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;type 'exceptions.RuntimeError'&amp;gt;: DescribeData: Method SpatialReference does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have an idea what's wrong with ArcGIS?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all replies&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 10:59:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-describe-spatialreference/m-p/562488#M43987</guid>
      <dc:creator>MartinRick</dc:creator>
      <dc:date>2011-02-02T10:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Describe.spatialReference</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-describe-spatialreference/m-p/562489#M43988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you mean to use arcpy.Describe(), not DescribeData()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy

# Create a Describe object from the raster dataset
#
desc = arcpy.Describe("C:/Data/Boulder.img")

# Print some raster dataset properties
# 
print "Band Count:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %d" % desc.bandCount
print "Compression Type: %s" % desc.compressionType
print "Raster Format:&amp;nbsp;&amp;nbsp;&amp;nbsp; %s" % desc.format

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:15:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-describe-spatialreference/m-p/562489#M43988</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2021-12-12T00:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Describe.spatialReference</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-describe-spatialreference/m-p/562490#M43989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;HI Andrew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unfortunately I think the Errormessage just uses the word "DescribeData", but my script uses the describe object in the right way. As I wrote in my first threat, when the script runs as stand-alone everything is fine. I am using the geoprocessor 9.3 an the code looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;describe = gp.Describe(raster) &lt;BR /&gt;if describe.SpatialReference.name == "Unknown":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.DefineProjection_management(raster, inputcoord)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I don't know why but it seems to me that the script works now also from the ArcToolbox. Maybe it was just another example of "Reboot your system and everything is fine again".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 05:19:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-describe-spatialreference/m-p/562490#M43989</guid>
      <dc:creator>MartinRick</dc:creator>
      <dc:date>2011-02-04T05:19:34Z</dc:date>
    </item>
  </channel>
</rss>

