<?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: Using Topo to Raster in Python??? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/using-topo-to-raster-in-python/m-p/197972#M6773</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Fixed.&amp;nbsp; I figured it out, finally.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Feb 2011 10:28:24 GMT</pubDate>
    <dc:creator>CharlesGant</dc:creator>
    <dc:date>2011-02-21T10:28:24Z</dc:date>
    <item>
      <title>Using Topo to Raster in Python???</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-topo-to-raster-in-python/m-p/197971#M6772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I posted this in the Python section as well since I did not really know where to post since it was both Python and Geoprocessing.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm new to exporting a model to python script. I'm trying to automate the generation of maps. I have a toolbox with a tool in it called PrecipMap. I need to be able to run that tool automatically. I exported the script and tried to run. I get this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;File "R:\PrecipMap\PrecipMapping.py", line 44, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.gp.TopoToRaster_sa("R:\\PrecipMap\\DailyPrec ip.shp pcpn PointElevation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;", TopoToR_shp2, "0.003", "R:\\Shapefiles\\Other Shapefiles\\MEGCWA.shp", "20",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"", "", "ENFORCE", "CONTOUR", "40", "", "1", "0", "", "", Output_stream_polyline&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_features, Output_remaining_sink_point_features, Output_diagnostic_file, Output_&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parameter_file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing \_base.py",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;line 474, in &amp;lt;lambda&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return lambda *args: val(*gp_fixargs(args))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Topo to Raster).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000628: Cannot set input into parameter extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it says the parameters are not set. This all works just fine in Model Builder. Can someone help me? I have tried to set the parameters but I'm not really sure what I'm doing or what the parameters even are. Everything in the topo to raster tool that is not "optional" is defined. Any help would be greatly appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, here is the exported code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# ---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# sample.py&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Created on: 2011-02-19 11:28:49.00000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# (generated by ArcGIS/ModelBuilder)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Description:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# ---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Check out any necessary licenses&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CheckOutExtension("spatial")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MEG_counties_shp__2_ = "R:\\Shapefiles\\Other Shapefiles\\MEG_counties.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rr3precip_csv = "W:\\gistemp\\rr3precip.csv"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DailyPrecip_layer = "DailyPrecip_layer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DailyPrecip_shp = "R:\\PrecipMap\\DailyPrecip.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TopoToR_shp2 = "R:\\ArcGIS\\Default.gdb\\TopoToR_shp2"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DailyPrecip_img = "R:\\PrecipMap\\DailyPrecip.img"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DailyPrecip100_img = "R:\\PrecipMap\\DailyPrecip100.img"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DailyPrec100 = "R:\\PrecipMap\\DailyPrec100"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DailyPrecipcontour_shp = "R:\\PrecipMap\\DailyPrecipcontour.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output_stream_polyline_features = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output_remaining_sink_point_features = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output_diagnostic_file = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output_parameter_file = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Make XY Event Layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeXYEventLayer_management(rr3precip_csv, "lon", "lat", DailyPrecip_layer, "", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print 'Make XY Event Layer Done'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Copy Features&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(DailyPrecip_layer, DailyPrecip_shp, "", "0", "0", "0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print 'Copy Features Done'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Topo to Raster&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.gp.TopoToRaster_sa("R:\\PrecipMap\\DailyPrec ip.shp pcpn PointElevation", TopoToR_shp2, "0.003", "R:\\Shapefiles\\Other Shapefiles\\MEGCWA.shp", "20", "", "", "ENFORCE", "CONTOUR", "40", "", "1", "0", "", "", Output_stream_polyline_features, Output_remaining_sink_point_features, Output_diagnostic_file, Output_parameter_file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print 'Topo To Raster Done'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Clip&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Clip_management(TopoToR_shp2, "-91.407437 33.650117 -87.970738 36.630955", DailyPrecip_img, MEG_counties_shp__2_, "", "ClippingGeometry")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print 'Clip Done'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Single Output Map Algebra&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.gp.SingleOutputMapAlgebra_sa("100 * [DailyPrecip.img] ", DailyPrecip100_img, "R:\\PrecipMap\\DailyPrecip.img")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print 'Map Algebra Done'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Int&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.gp.Int_sa(DailyPrecip100_img, DailyPrec100)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print 'Int Done'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Raster to Polygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RasterToPolygon_conversion(DailyPrec100, DailyPrecipcontour_shp, "SIMPLIFY", "VALUE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print 'Raster To Polygon'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the "print" commands in there so I could track where the errors where happening.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Feb 2011 12:05:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-topo-to-raster-in-python/m-p/197971#M6772</guid>
      <dc:creator>CharlesGant</dc:creator>
      <dc:date>2011-02-20T12:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Topo to Raster in Python???</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-topo-to-raster-in-python/m-p/197972#M6773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Fixed.&amp;nbsp; I figured it out, finally.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 10:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-topo-to-raster-in-python/m-p/197972#M6773</guid>
      <dc:creator>CharlesGant</dc:creator>
      <dc:date>2011-02-21T10:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Topo to Raster in Python???</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-topo-to-raster-in-python/m-p/197973#M6774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Charles, care to give a bit more details for those of us who are still struggling with this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bart&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 21:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-topo-to-raster-in-python/m-p/197973#M6774</guid>
      <dc:creator>BartKowalski</dc:creator>
      <dc:date>2011-12-21T21:48:48Z</dc:date>
    </item>
  </channel>
</rss>

