<?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 XArrrayToRaster fails with projection error in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/xarrraytoraster-fails-with-projection-error/m-p/1268290#M26764</link>
    <description>&lt;P&gt;I'm using ArcGIS Pro 3.0.3.&lt;/P&gt;&lt;P&gt;I'm doing some raster processing where I need functionality that the Arcgis tools don't provide.&amp;nbsp; &amp;nbsp;The data is a multidimensional raster.&amp;nbsp; &amp;nbsp;I thought XArray would be a good way to handle this.&amp;nbsp; The conversion from raster to xarray worked fine. The xarray processing produced the desired results.&amp;nbsp; &amp;nbsp;The conversion back to raster is failing with a message about projection.&amp;nbsp; To test things out I tried a simple in and out on the same data which failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
temp_max_file = r"D:\r3_analyst_work\Climate_Change_Modeling\climate_envelope\GridMetData_2020\tmmx_2020.nc"
test_rast = arcpy.Raster(temp_max_file,True)
test_rast_xr = arcpy.ia.RasterToXarray(test_rast)
out_rast = arcpy.ia.XarrayToRaster(test_rast_xr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This produces the following message:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;RuntimeError&lt;/SPAN&gt;                              Traceback (most recent call last)
In  &lt;SPAN class=""&gt;[144]&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1&lt;/SPAN&gt;:     out_rast = arcpy.ia.XarrayToRaster(test_rast_xr)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\RasterToXarray.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;XarrayToRaster&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;377&lt;/SPAN&gt;:   arcpy.DefineProjection_management(myraster, srs_stand)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;DefineProjection&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;13701&lt;/SPAN&gt;: &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; e

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;DefineProjection&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;13698&lt;/SPAN&gt;: retval = convertArcObjectToPythonObject(gp.DefineProjection_management(*gp_fixargs((in_dataset, coor_system), &lt;SPAN class=""&gt;True&lt;/SPAN&gt;)))

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;&amp;lt;lambda&amp;gt;&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;512&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;lambda&lt;/SPAN&gt; *args: val(*gp_fixargs(args, &lt;SPAN class=""&gt;True&lt;/SPAN&gt;))

&lt;SPAN class=""&gt;RuntimeError&lt;/SPAN&gt;: Unspecified error 
&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Wed, 15 Mar 2023 21:21:22 GMT</pubDate>
    <dc:creator>DavidAnderson_1701</dc:creator>
    <dc:date>2023-03-15T21:21:22Z</dc:date>
    <item>
      <title>XArrrayToRaster fails with projection error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/xarrraytoraster-fails-with-projection-error/m-p/1268290#M26764</link>
      <description>&lt;P&gt;I'm using ArcGIS Pro 3.0.3.&lt;/P&gt;&lt;P&gt;I'm doing some raster processing where I need functionality that the Arcgis tools don't provide.&amp;nbsp; &amp;nbsp;The data is a multidimensional raster.&amp;nbsp; &amp;nbsp;I thought XArray would be a good way to handle this.&amp;nbsp; The conversion from raster to xarray worked fine. The xarray processing produced the desired results.&amp;nbsp; &amp;nbsp;The conversion back to raster is failing with a message about projection.&amp;nbsp; To test things out I tried a simple in and out on the same data which failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
temp_max_file = r"D:\r3_analyst_work\Climate_Change_Modeling\climate_envelope\GridMetData_2020\tmmx_2020.nc"
test_rast = arcpy.Raster(temp_max_file,True)
test_rast_xr = arcpy.ia.RasterToXarray(test_rast)
out_rast = arcpy.ia.XarrayToRaster(test_rast_xr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This produces the following message:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;RuntimeError&lt;/SPAN&gt;                              Traceback (most recent call last)
In  &lt;SPAN class=""&gt;[144]&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1&lt;/SPAN&gt;:     out_rast = arcpy.ia.XarrayToRaster(test_rast_xr)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\RasterToXarray.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;XarrayToRaster&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;377&lt;/SPAN&gt;:   arcpy.DefineProjection_management(myraster, srs_stand)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;DefineProjection&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;13701&lt;/SPAN&gt;: &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; e

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;DefineProjection&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;13698&lt;/SPAN&gt;: retval = convertArcObjectToPythonObject(gp.DefineProjection_management(*gp_fixargs((in_dataset, coor_system), &lt;SPAN class=""&gt;True&lt;/SPAN&gt;)))

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;&amp;lt;lambda&amp;gt;&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;512&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;lambda&lt;/SPAN&gt; *args: val(*gp_fixargs(args, &lt;SPAN class=""&gt;True&lt;/SPAN&gt;))

&lt;SPAN class=""&gt;RuntimeError&lt;/SPAN&gt;: Unspecified error 
&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 15 Mar 2023 21:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/xarrraytoraster-fails-with-projection-error/m-p/1268290#M26764</guid>
      <dc:creator>DavidAnderson_1701</dc:creator>
      <dc:date>2023-03-15T21:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: XArrrayToRaster fails with projection error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/xarrraytoraster-fails-with-projection-error/m-p/1273699#M26795</link>
      <description>&lt;P&gt;We can reproduce this issue, and have logged an issue to address it in the next release.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 17:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/xarrraytoraster-fails-with-projection-error/m-p/1273699#M26795</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2023-03-30T17:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: XArrrayToRaster fails with projection error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/xarrraytoraster-fails-with-projection-error/m-p/1312014#M26936</link>
      <description>&lt;P&gt;The issue has been addressed, and will be fixed in the upcoming Pro release.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 14:22:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/xarrraytoraster-fails-with-projection-error/m-p/1312014#M26936</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2023-07-26T14:22:03Z</dc:date>
    </item>
  </channel>
</rss>

