<?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: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631832#M49222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can't see anything obvious so it is time for print statements particularly the output filename... I know, you set the env, but stranger things have happened... try c:/temp/x.tif&lt;/P&gt;&lt;P&gt;The print statements will narrow down where it failed since your inputs 'look' good, but not confirmed yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Aug 2016 21:04:36 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-08-15T21:04:36Z</dc:date>
    <item>
      <title>Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631823#M49213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I copied the sample python script from this webpage and modified for my own data and paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/topo-to-raster.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/topo-to-raster.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Topo to Raster—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# Name: TopoToRaster_Ex_02.py&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Description: Interpolates a hydrologically correct surface &lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; from point, line, and polygon data.&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Requirements: Spatial Analyst Extension&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# testing topo to raster gcr&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Import system modules&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; env
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sa &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Set environment settings&lt;/SPAN&gt;
env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"D:/clovis_portales/cp_spatial/hydrology/water_level_analysis_v7_py"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Set local variables&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##inPointElevations = TopoPointElevation(['wells_in.shp', 'usgs_wl'])&lt;/SPAN&gt;

inContours &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; TopoContour&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'rwl_krg_cntr_smth.shp'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'CONTOUR'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Check out the ArcGIS Spatial Analyst extension license&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CheckOutExtension&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Spatial"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Execute TopoToRaster&lt;/SPAN&gt;
outTTR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; TopoToRaster&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inContours&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;### Save the output &lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##outTTR.save("D:/clovis_portales/cp_spatial/hydrology/water_level_analysis_v7_py/ttrout03")&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I keep getting the following errors:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"D:\clovis_portales\cp_spatial\hydrology\water_level_analysis_v7_py\ord_krige_2010_2015_wls_v2_for_question_post.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;25&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; outTTR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; TopoToRaster&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inContours&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Functions.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;2777&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; TopoToRaster
&amp;nbsp;&amp;nbsp;&amp;nbsp; out_contour_error_feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Utils.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;53&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; swapper
&amp;nbsp;&amp;nbsp;&amp;nbsp; result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; wrapper&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;**&lt;/SPAN&gt;kwargs&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Functions.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;2753&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; Wrapper
&amp;nbsp;&amp;nbsp;&amp;nbsp; out_contour_error_feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; File &lt;SPAN class="string token"&gt;"C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\geoprocessing\_base.py"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;504&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;lambda&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;lambda&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; val&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;gp_fixargs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
RuntimeError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Object&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Error &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; executing tool
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It doesnt work with point or contour data. Topo to raster works fine with same data and paths when using the GUI in arc toolbox&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance for any help&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631823#M49213</guid>
      <dc:creator>GeoffreyRawling</dc:creator>
      <dc:date>2021-12-12T02:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631824#M49214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/community/developers/gis-developers/python?sr=search&amp;amp;searchId=bace911a-a053-438f-868e-b672ad5e8969&amp;amp;searchIndex=0"&gt;https://community.esri.com/community/developers/gis-developers/python?sr=search&amp;amp;searchId=bace911a-a053-438f-868e-b672ad5e8969&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 17:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631824#M49214</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-08-15T17:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631825#M49215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting?sr=search&amp;amp;searchId=0379bdd5-849e-48b8-983a-89b54c4d7003&amp;amp;searchIndex=0"&gt;/blogs/dan_patterson/2016/08/14/script-formatting?sr=search&amp;amp;searchId=0379bdd5-849e-48b8-983a-89b54c4d7003&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 17:55:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631825#M49215</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-08-15T17:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631826#M49216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apart from the tip to use Code formatting to make your code more readable (as Joshua suggested), there are some things I see to start with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You use Spatial Analyst functionality before checking out the extension. If this script is executed as standalone script, it will yield an error (although different from the one you have)&lt;/LI&gt;&lt;LI&gt;Your workspace is pretty long and has a lot of underscores. Some functionality of Spatial Analyst will not "like" that. You could try it with a shorter path&lt;/LI&gt;&lt;LI&gt;Most importantly, first try to do this manually (using the tools in ArcMap). The results window will provide&amp;nbsp;access to Python Snippets that you may copy to examine the way the tools should be called to make this work.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See:&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm"&gt;Using the Results window—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look at the option "&lt;STRONG&gt;Copy As Python Snippet&lt;/STRONG&gt;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 18:35:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631826#M49216</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-08-15T18:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631827#M49217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And since this may well be data related I would be could to provide some data you are using to see if we can reproduce the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 18:36:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631827#M49217</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-08-15T18:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631828#M49218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you copy the Python Snippet you will get something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.gp.TopoToRaster_sa("&lt;STRONG&gt;contours_v2 Elevation Contour&lt;/STRONG&gt;", "C:/Users/Xander/Documents/ArcGIS/Default.gdb/DEM10m", "10", "824700 1173050 826900 1175000", "20", "", "", "ENFORCE", "CONTOUR", "20", "", "1", "0", "2,5", "100", "", "", "", "", "", "", "", "")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first parameter is a string and consists of 3&amp;nbsp;items:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;contours_v2 (the featureclass with the contourlines)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Elevation (the field with the height values&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Contour (the way you want to use the&amp;nbsp;lines to create the topo raster)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The second parameter is the output raster and the other parameters are optional.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In this case the tool was executed from ArcMap and the featureclass is present in my TOC. If you want to execute the tool from a standalone script, you will&amp;nbsp;either need to have the featureclass available in a previously defined workspace or use a complete path to access the data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also note the for some strange reason the python snippet does not use &lt;EM&gt;arcpy.sa.TopoToRaster&lt;/EM&gt;, but &lt;EM&gt;arcpy.gp.TopoToRaster_sa&lt;/EM&gt;. Since the Interpolation tools are also available in 3D Analyst you also have "&lt;EM&gt;arcpy.TopoToRaster_3d&lt;/EM&gt;" and "&lt;EM&gt;arcpy.ddd.TopoToRaster&lt;/EM&gt;" which should all do the same thing.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 19:15:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631828#M49218</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-08-15T19:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631829#M49219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for replies. This bit of code modified from the help page on the 3d analyst works. I had tried all sorts of versions using the spatial analysts topo to raster tool, including exporting the code snippet from arctoolbox and they did not work, kept getting the same error. Gui interface in arc toolbox always worked fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# V3&amp;nbsp; - modified by gcr&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Description: trying to recreate workflow of v7 analysis w py scripts&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# ---------------------------------------------------------------------------&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# import necessary modules etc.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arceditor
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; env
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sa &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cartography &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# set workspace&lt;/SPAN&gt;
env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"D:\\clovis_portales\\cp_spatial\\hydrology\\water_level_analysis_v7_py"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# check out license&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CheckOutExtension&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Spatial"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CheckOutExtension&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"3d"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# set to overwrite outputs&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;overwriteOutput &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Process: Topo to Raster using original data points and the smoothed kriged contours, 3d version, works&lt;/SPAN&gt;

inPointElevations &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"usgs_CR_wells_w_good_2010_2015_wls_matching_T_08_wells_33_rise_removed.shp usgs_wl Pointelevation"&lt;/SPAN&gt;
inContours &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"rwl_krg_cntr_smth.shp CONTOUR Contour"&lt;/SPAN&gt;
inFeatures &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inPointElevations &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;";"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; inContours&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
outRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="string token"&gt;"wl_surf_smth_kgr_cntrs_and_points.tif"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Execute TopoToRaster&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TopoToRaster_3d&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inFeatures&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outRaster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:53:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631829#M49219</guid>
      <dc:creator>GeoffreyRawling</dc:creator>
      <dc:date>2021-12-12T02:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631830#M49220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I formatted the original code.&lt;/P&gt;&lt;P&gt;The last line, where you saved the raster, is commented out.... if you uncomment it, does it work? &amp;nbsp;In a standalone script you need to save it... to a much shorter path, it is almost too long&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631830#M49220</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-15T20:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631831#M49221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I uncommented the saving of the raster and moved the "check out extension" line up. Still does not work, same errors. Paths can be 128 chars for a grid but longer for other file types correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:47:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631831#M49221</guid>
      <dc:creator>GeoffreyRawling</dc:creator>
      <dc:date>2016-08-15T20:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631832#M49222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can't see anything obvious so it is time for print statements particularly the output filename... I know, you set the env, but stranger things have happened... try c:/temp/x.tif&lt;/P&gt;&lt;P&gt;The print statements will narrow down where it failed since your inputs 'look' good, but not confirmed yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 21:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631832#M49222</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-15T21:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get ArcGIS 10.3.1 “topo to raster” to work in python script</title>
      <link>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631833#M49223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I look at the code of example 2 at&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/3d-analyst-toolbox/topo-to-raster.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/3d-analyst-toolbox/topo-to-raster.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Topo to Raster—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;, I notice that they are using "Point&lt;STRONG&gt;E&lt;/STRONG&gt;levation" instead of&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Pointelevation". This difference might be something that could create the error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When using the&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-spatial-analyst/topocontour-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-spatial-analyst/topocontour-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;TopoContour—Spatial Analyst module | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-spatial-analyst/topopointelevation-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-spatial-analyst/topopointelevation-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;TopoPointElevation—Spatial Analyst module | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;classes and using the sample code from those pages. your code would be something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

&lt;SPAN class="comment token"&gt;# set workspace (still think the path is very long)&lt;/SPAN&gt;
ws &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"D:\\clovis_portales\\cp_spatial\\hydrology\\water_level_analysis_v7_py"&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ws

&lt;SPAN class="comment token"&gt;# check out license&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CheckOutExtension&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Spatial"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CheckOutExtension&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"3D"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# set to overwrite outputs&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;overwriteOutput &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Topo inputs (assuming all input data is store in the ws)&lt;/SPAN&gt;
inPointElevations &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sa&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TopoPointElevation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"usgs_CR_wells_w_good_2010_2015_wls_matching_T_08_wells_33_rise_removed.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"usgs_wl"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
inContours &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sa&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TopoContour&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"rwl_krg_cntr_smth.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CONTOUR"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Execute TopoToRaster&lt;/SPAN&gt;
outTopoToRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TopoToRaster_3d&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;inPointElevations&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inContours&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# save the result&lt;/SPAN&gt;
outRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"wl_surf_smth_kgr_cntrs_and_points.tif"&lt;/SPAN&gt;
outTopoToRaster&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;save&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ws&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outTopoToRaster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still believe you should shorten the names of your paths and input data, since this may also be a cause for errors. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:53:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cant-get-arcgis-10-3-1-topo-to-raster-to-work-in/m-p/631833#M49223</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T02:53:26Z</dc:date>
    </item>
  </channel>
</rss>

