{"id":259412,"date":"2018-06-29T16:18:02","date_gmt":"2018-06-29T16:18:02","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=259412"},"modified":"2018-06-29T17:07:55","modified_gmt":"2018-06-30T00:07:55","slug":"executing-spatial-analyst-tools-using-arcgis-pro-sdk-2","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2","title":{"rendered":"Executing Spatial Analyst Tools Using ArcGIS Pro SDK"},"author":5751,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23341],"tags":[],"industry":[],"product":[36561,36851,37031],"class_list":["post-259412","blog","type-blog","status-publish","format-standard","hentry","category-analytics","product-arcgis-pro","product-arcgis-pro-net","product-spatial-analyst"],"acf":{"short_description":"In this blog, we take a look at how to execute Spatial Analyst tools in your add-in using the ArcGIS Pro SDK.","flexible_content":[{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/sdk\/\">ArcGIS Pro SDK<\/a> for .Net allows you to extend the ArcGIS Pro user interface by creating custom add-ins leveraging different GIS functionalities. In this blog, we will take a look at how to execute Spatial Analyst tools in your add-in using the ArcGIS Pro SDK.<\/p>\n<p><strong>How to execute a geoprocessing tool<\/strong><\/p>\n<p>The ArcGIS.Desktop.Core.Geoprocessing namespace in the SDK provides a Geoprocessing class to help execute a geoprocessing tool. The Geoprocessing class within the namespace offers necessary methods to specify the input parameters, set up environment settings, and execute the geoprocessing tool. The static method, <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/sdk\/api-reference\/#topic9385.html\">ExecuteToolAsync<\/a> is used to execute the tool.<br \/>\nThe first argument for ExecuteToolAsync is the geoprocessing tool name as a string. To specify a tool uniquely, the tool name must be appended with its toolbox alias. For example, the <a href=\"http:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/data-management\/copy-features.htm\">Copy Features<\/a> tool is in the data management toolbox, and the alias of the data management toolbox is management. Therefore, to execute the Copy Features tool, the tool name should be specified as CopyFeatures_management. Without the toolbox alias, or with a misspelled toolbox alias, an error will be returned and the tool will not be executed because the geoprocessing framework is not able to find the tool.<br \/>\nThe second argument for ExecuteToolAsync is the tool parameter values array, which holds all the input and output parameter values for the geoprocessing tool. Do not create the array yourself. Simply call the method MakeValueArray, to create it, passing in all input and output parameter values as arguments.<br \/>\nAdditionally, you may want to specify an environment setting for the tool execution. The third argument for ExecuteToolAsync allows you to do that. Like the input\/output parameters, the environment settings also need to be specified in an array. Again, no need to create the array by yourself, simply call the method MakeEnvironmentArray to make one.<br \/>\nThe rest of the arguments for ExecuteToolAsync are optional. As an asynchronous method, ExecuteToolAsync will start the geoprocessing tool execution in a different thread other than the user interface (UI) thread, which allows the ArcGIS Pro UI to remain active while the tool executes.<\/p>\n<p><strong>How to execute a Spatial Analyst tool<\/strong><\/p>\n<p>Executing a Spatial Analyst tool is no different than any other geoprocessing tool. All we need to do is supply a tool name with an appropriate toolbox alias, which is sa. The following example will walk you through a C# example on how to execute the <a href=\"http:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/spatial-analyst\/zonal-statistics.htm\">Zonal Statistics<\/a> tool to calculate average elevation for each zone, using SDK.<\/p>\n<p>Let&#8217;s start by specifying the tool input and output parameters:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ declaring tool parameter variables<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">inZoneRas =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\">@<q>c:\\data\\county.tif<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span> <span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ input zone raster<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">zoneField =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\"><q>Value<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span> <span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ zone field<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">inValueRas =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\">@<q>c:\\data\\elevation.tif<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span> <span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ input valueraster<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">outRaster =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\">@<q>c:\\output\\outzs01.tif<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span> <span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ output raster<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">statType =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\"><q>MEAN<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span> <span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ statistics type<\/span><br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">bool <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">ignoreNoData = <\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">true <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span> <span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ ignore NoData option<\/span><\/p>\n<p>Now let\u2019s create the first array with the above parameter values using the Geoprocessing.MakeValueArray method:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ create an array for the input parameter values<\/span><br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">var <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">valueArray = Geoprocessing.MakeValueArray(inZoneRas, zoneField, inValueRas, outRaster, statType, ignoreNoData);<\/span><\/p>\n<p>Next, create another array for environment settings using Geoprocessing.MakeEnvironmentArray to set the cell size for analysis and to overwrite output if it exists:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ create an array for the environment settings<\/span><br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">var <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">envArray = Geoprocessing.MakeEnvironmentArray(overwriteoutput: <span style=\"color: #0000ff;\">true<\/span>, cellSize: 30);<\/span><\/p>\n<p>Finally, let\u2019s execute the tool by calling the ExecuteToolAsync method, passing in the tool name, the tool parameter values array, and the environment settings array that we created above. Notice that the tool name \u2018ZonalStatistics\u2019 is appended with its toolbox alias \u2018sa\u2019, which refers to the Spatial Analyst toolbox:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ run ZonalStatistics<\/span><br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas;\"><span style=\"color: #0000ff;\">var <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">gpresult1 = <span style=\"color: #0000ff;\">await <\/span>Geoprocessing.ExecuteToolAsync(<span style=\"color: brown; font-family: Consolas; font-size: 13pt;\"><q>ZonalStatistics_sa<\/q><\/span>, valueArray, envArray);<\/span><\/p>\n<p>Because the Spatial Analyst is an extension product, a license is required in order to use its capabilities. However, we did not enable the license in the preceding code snippet as in our case, it is enabled through the ArcGIS Pro application. If the Spatial Analyst license is not already enabled, the tool execution will fail with a licensing error. To enable the Spatial Analyst license, configure your licensing options from the ArcGIS Pro application.<\/p>\n<p><strong>How to execute a map algebra expression<\/strong><\/p>\n<p>Now that we have learned how to execute a Spatial Analyst tool using the ArcGIS Pro SDK, let&#8217;s look at another example. In raster modeling, we often need to execute map algebra expression to solve a complex problem. In the Spatial Analyst toolbox, the tool that allows us to execute map algebra expression is called <a href=\"http:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/spatial-analyst\/raster-calculator.htm\">Raster Calculator<\/a>.<br \/>\nIn your add-in, you may take advantage of the Raster Calculator tool to execute single-line map algebra expressions. The Raster Calculator tool has two parameters only. The first parameter is the map algebra expression itself. The second parameter is the output raster, which saves the result of the calculation.<br \/>\nIn the example below, let\u2019s build a map algebra expression to find the land uses for areas with slope greater than 30 degrees and aspect less than 120 degrees, and use the Raster Calculator tool to execute it.<\/p>\n<p>First, let\u2019s specify the input raster datasets that will be used in our map algebra expression:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ input raster datasets for the map algebra expression<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">inRas1 =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\">@<q>c:\\data\\in_slope.tif<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">inRas2 =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\">@<q>c:\\data\\in_aspect.tif<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span><br \/>\n<span style=\"color: blue; font-family: Consolas; font-size: 13pt;\">string<\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">inRas3 =<\/span> <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\">@<q>c:\\data\\in_landuse.tif<\/q><\/span> <span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">;<\/span><\/p>\n<p>Now, let\u2019s build the map algebra expression. Notice that the input raster datasets are embedded in the expression itself, enclosed by single quotation marks:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ define the map algebra expression<br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">string <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">maExpression = String.Format(<span style=\"color: brown; font-family: Consolas; font-size: 13pt;\"><q>Con((&#8216;{0}&#8217; &gt; 30) &amp; (&#8216;{1}&#8217; &lt; 120), &#8216;{2}&#8217;)<\/q><\/span>,inRas1, inRas2, inRas3);<\/span><\/span><\/p>\n<p>We need another variable to specify the output raster:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ define the output raster<br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">string <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">outRaster = <span style=\"color: brown; font-family: Consolas; font-size: 13pt;\">@<q>c:\\output\\outrascal01.tif<\/q><\/span> ;<\/span><\/span><\/p>\n<p>Now we can create an array using maExpression and outRaster:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ make the input parameter values array<\/span><br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">var <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">valueArray = Geoprocessing.MakeValueArray(maExpression, outRaster);<\/span><\/p>\n<p>Finally, we kick off the Raster Calculator tool, which will execute the map algebra expression and save the result in outRaster:<\/p>\n<p><span style=\"color: green; font-family: Consolas; font-size: 13pt;\">\/\/ execute the Raster calculator tool to process the map algebra expression<\/span><br \/>\n<span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\"><span style=\"color: #0000ff;\">var <\/span><\/span><span style=\"color: #6e6e6e; font-family: Consolas; font-size: 13pt;\">gpresult1 = <span style=\"color: #0000ff;\">await <\/span>Geoprocessing.ExecuteToolAsync(<span style=\"color: brown; font-family: Consolas; font-size: 13pt;\"><q>RasterCalculator_sa<\/q><\/span>, valueArray);<\/span><\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>Now that you are comfortable executing Spatial Analyst tools and map algebra expressions, you can perform raster modeling in your add-ins. If you need more information, check out our help pages on <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/sdk\/\">ArcGIS Pro SDK<\/a> and <a href=\"http:\/\/pro.arcgis.com\/en\/pro-app\/help\/analysis\/spatial-analyst\/basics\/get-started-with-spatial-analyst-in-arcgis-pro.htm\">ArcGIS Pro Spatial Analyst<\/a>.<\/p>\n"}],"authors":[{"ID":5751,"user_firstname":"Xuguang","user_lastname":"Wang","nickname":"Xuguang Wang","user_nicename":"waxg","display_name":"Xuguang Wang","user_email":"xuguang_wang@esri.com","user_url":"","user_registered":"2018-03-02 00:17:35","user_description":"Xuguang is a Product Engineer in the Spatial Analysis and Data Science team. He works with colleagues to design, develop and maintain geoprocessing tools with a focus in Raster Analysis.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/xgpic-1.jpg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"related_articles":"","card_image":false,"wide_image":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Executing Spatial Analyst Tools Using ArcGIS Pro SDK<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Executing Spatial Analyst Tools Using ArcGIS Pro SDK\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-30T00:07:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2\"},\"author\":{\"name\":\"Xuguang Wang\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/9bd3314a4d4095856694c646ee65811d\"},\"headline\":\"Executing Spatial Analyst Tools Using ArcGIS Pro SDK\",\"datePublished\":\"2018-06-29T16:18:02+00:00\",\"dateModified\":\"2018-06-30T00:07:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2\"},\"wordCount\":8,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2\",\"name\":\"Executing Spatial Analyst Tools Using ArcGIS Pro SDK\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2018-06-29T16:18:02+00:00\",\"dateModified\":\"2018-06-30T00:07:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Executing Spatial Analyst Tools Using ArcGIS Pro SDK\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/9bd3314a4d4095856694c646ee65811d\",\"name\":\"Xuguang Wang\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/xgpic-1.jpg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/xgpic-1.jpg\",\"caption\":\"Xuguang Wang\"},\"description\":\"Xuguang is a Product Engineer in the Spatial Analysis and Data Science team. He works with colleagues to design, develop and maintain geoprocessing tools with a focus in Raster Analysis.\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/waxg\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Executing Spatial Analyst Tools Using ArcGIS Pro SDK","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2","og_locale":"en_US","og_type":"article","og_title":"Executing Spatial Analyst Tools Using ArcGIS Pro SDK","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-06-30T00:07:55+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2"},"author":{"name":"Xuguang Wang","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/9bd3314a4d4095856694c646ee65811d"},"headline":"Executing Spatial Analyst Tools Using ArcGIS Pro SDK","datePublished":"2018-06-29T16:18:02+00:00","dateModified":"2018-06-30T00:07:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2"},"wordCount":8,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"articleSection":["Analytics"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2","name":"Executing Spatial Analyst Tools Using ArcGIS Pro SDK","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2018-06-29T16:18:02+00:00","dateModified":"2018-06-30T00:07:55+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro-net\/analytics\/executing-spatial-analyst-tools-using-arcgis-pro-sdk-2#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Executing Spatial Analyst Tools Using ArcGIS Pro SDK"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/9bd3314a4d4095856694c646ee65811d","name":"Xuguang Wang","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/xgpic-1.jpg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/07\/xgpic-1.jpg","caption":"Xuguang Wang"},"description":"Xuguang is a Product Engineer in the Spatial Analysis and Data Science team. He works with colleagues to design, develop and maintain geoprocessing tools with a focus in Raster Analysis.","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/waxg"}]}},"text_date":"June 29, 2018","author_name":"Xuguang Wang","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/waxg","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcGIS Pro SDK","tag_data":[],"category_data":[{"term_id":23341,"name":"Analytics","slug":"analytics","term_group":0,"term_taxonomy_id":23341,"taxonomy":"category","description":"","parent":0,"count":1331,"filter":"raw"}],"product_data":[{"term_id":36561,"name":"ArcGIS Pro","slug":"arcgis-pro","term_group":0,"term_taxonomy_id":36561,"taxonomy":"product","description":"","parent":0,"count":2040,"filter":"raw"},{"term_id":36851,"name":"ArcGIS Pro SDK","slug":"arcgis-pro-net","term_group":0,"term_taxonomy_id":36851,"taxonomy":"product","description":"","parent":36601,"count":91,"filter":"raw"},{"term_id":37031,"name":"ArcGIS Spatial Analyst","slug":"spatial-analyst","term_group":0,"term_taxonomy_id":37031,"taxonomy":"product","description":"","parent":36981,"count":93,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-pro-net","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/259412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/5751"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=259412"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/259412\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=259412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=259412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=259412"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=259412"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=259412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}