<?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>idea Overhaul Raster Calculator in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/overhaul-raster-calculator/idi-p/1578910</link>
    <description>&lt;P&gt;Raster Calculator is an amazing toolset, but it seems antiquated and clunky.&amp;nbsp; It's processes are comparatively slow and there is little to no multi-threading or GPU enabled processing.&amp;nbsp; There are a number of python tools that have emerged over the last decade and a number of new requirements with stacked data.&amp;nbsp; One example of clunkiness is there is no "Round" function only work arounds like int(raster + 0.5).&lt;/P&gt;&lt;P&gt;All in all an overhaul would be a significant level of effort, but would better align with broader trends in scientific computing, data science, and big raster analytics.&lt;/P&gt;&lt;P&gt;Here are some additional options that ChatGPT came up with:&lt;BR /&gt;&lt;BR /&gt;1. Adopt more Pythonic Syntax&lt;/P&gt;&lt;P&gt;A single unified module instead of map algebra behind arcpy.sa... make it single module e.g. import arcgis.raster as rt.&amp;nbsp; building on that bring in direct python functions like rt.round(raster) so that all the logic fits.&lt;/P&gt;&lt;P&gt;2. Full Integration of Python Built-Ins&lt;BR /&gt;One of the biggest frustrations is that not all Python functions (like round() or advanced math functions from math or numpy) are directly usable in Raster Calculator. Esri could:&lt;/P&gt;&lt;P&gt;Embed a Python interpreter that truly compiles or interprets your expressions as standard Python code, rather than parsing them in a specialized subset.&lt;BR /&gt;Expose safe versions of built-in Python functions (round, floor, ceil, hypot, sqrt, etc.) as first-class citizens for raster math.&lt;BR /&gt;Support standard libraries like NumPy or SciPy in a restricted sense (like numpy.sin(raster) or numpy.clip(raster, 0, 255)) without forcing users to do the manual RasterToNumPyArray round trip.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;3. Advanced Array Operations (à la NumPy / xarray)&lt;BR /&gt;Many advanced raster operations in data science rely on array-like manipulations—stacking layers, broadcasting operations, rolling or shifting windows, etc. Currently, you can do some of this with arcpy.sa.Con, FocalStatistics, etc., but it can get verbose. An overhaul might include:&lt;/P&gt;&lt;P&gt;True xarray-like operations (like ds.sel(x=..., y=...) or ds.mean(dim='time') for time-enabled or mosaic datasets).&lt;BR /&gt;Named dimension support for multi-band or multi-dimensional rasters, so you can do myRaster.sel(band="NDVI") or myRaster.sel(time="2025-01-01").&lt;BR /&gt;Lazy evaluation or chunked processing behind the scenes, so large raster calculations do not crash memory.&lt;/P&gt;&lt;P&gt;3. Advanced Array Operations (à la NumPy / xarray)&lt;BR /&gt;Many advanced raster operations in data science rely on array-like manipulations—stacking layers, broadcasting operations, rolling or shifting windows, etc. Currently, you can do some of this with arcpy.sa.Con, FocalStatistics, etc., but it can get verbose. An overhaul might include:&lt;/P&gt;&lt;P&gt;True xarray-like operations (like ds.sel(x=..., y=...) or ds.mean(dim='time') for time-enabled or mosaic datasets).&lt;BR /&gt;Named dimension support for multi-band or multi-dimensional rasters, so you can do myRaster.sel(band="NDVI") or myRaster.sel(time="2025-01-01").&lt;BR /&gt;Lazy evaluation or chunked processing behind the scenes, so large raster calculations do not crash memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Extend Raster Functions to a More Open, Composable Model&lt;BR /&gt;ArcGIS has Raster Functions and Function Chains, but they are somewhat tied to the ArcGIS Pro GUI or mosaic datasets. An overhaul might unify:&lt;/P&gt;&lt;P&gt;Raster Functions = First-class Python objects that you can chain in code (like pipeline operators in NumPy or dask).&lt;BR /&gt;On-the-fly execution or deferred execution: Let users build a function graph (chain) and only compute when calling .save() or .compute().&lt;BR /&gt;Parameterizable function templates that can be saved, shared, or integrated into code, so that writing “my custom slope function” is as simple as creating a Python function&lt;/P&gt;&lt;P&gt;5. Better Error Messaging &amp;amp; Logging&lt;BR /&gt;Currently, when Raster Calculator fails, we often see vague messages like ERROR 010240: Could not save raster dataset .... A more modern approach would provide:&lt;/P&gt;&lt;P&gt;Clear stack traces that identify which part of the expression or function failed.&lt;BR /&gt;Warnings if dimension limits or data type constraints might be exceeded.&lt;/P&gt;&lt;P&gt;6. Leverage Multicore &amp;amp; GPU Processing&lt;BR /&gt;ArcGIS Pro has made progress with multi-threaded or distributed raster analysis, but from a user’s perspective, it’s mostly hidden. A “next generation” map algebra could:&lt;/P&gt;&lt;P&gt;Let users run certain operations on GPU if supported (like a gpu=True parameter).&lt;BR /&gt;Scale across multiple cores or machines for big data automatically, if the environment (ArcGIS Enterprise, Portal, or distributed computing) is configured.&lt;BR /&gt;Provide transparent out-of-core or chunk-based processing for extremely large rasters, similar to dask.&lt;/P&gt;&lt;P&gt;7. Backwards Compatibility&lt;BR /&gt;While a full overhaul could break older scripts, Esri typically needs to maintain continuity. Likely, they would keep the old Raster Calculator tool as-is, but introduce a new advanced environment (like “Raster Analysis Next Gen” or arcpy.rnx) that offers:&lt;/P&gt;&lt;P&gt;A pure-Python approach (or partial rewriting in .NET with Python hooks).&lt;BR /&gt;Direct usage of new features while continuing to support old map algebra expressions for older workflows.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Conclusion&lt;BR /&gt;In summary, a thorough modernization of the Raster Calculator / Map Algebra stack could:&lt;/P&gt;&lt;P&gt;1. Adopt a more Pythonic approach that allows direct usage of standard Python math (including round()).&lt;BR /&gt;2. Integrate with array-based libraries and named dimensions (à la xarray) for modern data science workflows.&lt;BR /&gt;3. Provide consistent chunk-based or GPU-accelerated computations for large data.&lt;BR /&gt;4. Simplify user expressions while still delivering advanced raster operations.&lt;/P&gt;</description>
    <pubDate>Sat, 25 Jan 2025 15:48:16 GMT</pubDate>
    <dc:creator>WalkerKB</dc:creator>
    <dc:date>2025-01-25T15:48:16Z</dc:date>
    <item>
      <title>Overhaul Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/overhaul-raster-calculator/idi-p/1578910</link>
      <description>&lt;P&gt;Raster Calculator is an amazing toolset, but it seems antiquated and clunky.&amp;nbsp; It's processes are comparatively slow and there is little to no multi-threading or GPU enabled processing.&amp;nbsp; There are a number of python tools that have emerged over the last decade and a number of new requirements with stacked data.&amp;nbsp; One example of clunkiness is there is no "Round" function only work arounds like int(raster + 0.5).&lt;/P&gt;&lt;P&gt;All in all an overhaul would be a significant level of effort, but would better align with broader trends in scientific computing, data science, and big raster analytics.&lt;/P&gt;&lt;P&gt;Here are some additional options that ChatGPT came up with:&lt;BR /&gt;&lt;BR /&gt;1. Adopt more Pythonic Syntax&lt;/P&gt;&lt;P&gt;A single unified module instead of map algebra behind arcpy.sa... make it single module e.g. import arcgis.raster as rt.&amp;nbsp; building on that bring in direct python functions like rt.round(raster) so that all the logic fits.&lt;/P&gt;&lt;P&gt;2. Full Integration of Python Built-Ins&lt;BR /&gt;One of the biggest frustrations is that not all Python functions (like round() or advanced math functions from math or numpy) are directly usable in Raster Calculator. Esri could:&lt;/P&gt;&lt;P&gt;Embed a Python interpreter that truly compiles or interprets your expressions as standard Python code, rather than parsing them in a specialized subset.&lt;BR /&gt;Expose safe versions of built-in Python functions (round, floor, ceil, hypot, sqrt, etc.) as first-class citizens for raster math.&lt;BR /&gt;Support standard libraries like NumPy or SciPy in a restricted sense (like numpy.sin(raster) or numpy.clip(raster, 0, 255)) without forcing users to do the manual RasterToNumPyArray round trip.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;3. Advanced Array Operations (à la NumPy / xarray)&lt;BR /&gt;Many advanced raster operations in data science rely on array-like manipulations—stacking layers, broadcasting operations, rolling or shifting windows, etc. Currently, you can do some of this with arcpy.sa.Con, FocalStatistics, etc., but it can get verbose. An overhaul might include:&lt;/P&gt;&lt;P&gt;True xarray-like operations (like ds.sel(x=..., y=...) or ds.mean(dim='time') for time-enabled or mosaic datasets).&lt;BR /&gt;Named dimension support for multi-band or multi-dimensional rasters, so you can do myRaster.sel(band="NDVI") or myRaster.sel(time="2025-01-01").&lt;BR /&gt;Lazy evaluation or chunked processing behind the scenes, so large raster calculations do not crash memory.&lt;/P&gt;&lt;P&gt;3. Advanced Array Operations (à la NumPy / xarray)&lt;BR /&gt;Many advanced raster operations in data science rely on array-like manipulations—stacking layers, broadcasting operations, rolling or shifting windows, etc. Currently, you can do some of this with arcpy.sa.Con, FocalStatistics, etc., but it can get verbose. An overhaul might include:&lt;/P&gt;&lt;P&gt;True xarray-like operations (like ds.sel(x=..., y=...) or ds.mean(dim='time') for time-enabled or mosaic datasets).&lt;BR /&gt;Named dimension support for multi-band or multi-dimensional rasters, so you can do myRaster.sel(band="NDVI") or myRaster.sel(time="2025-01-01").&lt;BR /&gt;Lazy evaluation or chunked processing behind the scenes, so large raster calculations do not crash memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Extend Raster Functions to a More Open, Composable Model&lt;BR /&gt;ArcGIS has Raster Functions and Function Chains, but they are somewhat tied to the ArcGIS Pro GUI or mosaic datasets. An overhaul might unify:&lt;/P&gt;&lt;P&gt;Raster Functions = First-class Python objects that you can chain in code (like pipeline operators in NumPy or dask).&lt;BR /&gt;On-the-fly execution or deferred execution: Let users build a function graph (chain) and only compute when calling .save() or .compute().&lt;BR /&gt;Parameterizable function templates that can be saved, shared, or integrated into code, so that writing “my custom slope function” is as simple as creating a Python function&lt;/P&gt;&lt;P&gt;5. Better Error Messaging &amp;amp; Logging&lt;BR /&gt;Currently, when Raster Calculator fails, we often see vague messages like ERROR 010240: Could not save raster dataset .... A more modern approach would provide:&lt;/P&gt;&lt;P&gt;Clear stack traces that identify which part of the expression or function failed.&lt;BR /&gt;Warnings if dimension limits or data type constraints might be exceeded.&lt;/P&gt;&lt;P&gt;6. Leverage Multicore &amp;amp; GPU Processing&lt;BR /&gt;ArcGIS Pro has made progress with multi-threaded or distributed raster analysis, but from a user’s perspective, it’s mostly hidden. A “next generation” map algebra could:&lt;/P&gt;&lt;P&gt;Let users run certain operations on GPU if supported (like a gpu=True parameter).&lt;BR /&gt;Scale across multiple cores or machines for big data automatically, if the environment (ArcGIS Enterprise, Portal, or distributed computing) is configured.&lt;BR /&gt;Provide transparent out-of-core or chunk-based processing for extremely large rasters, similar to dask.&lt;/P&gt;&lt;P&gt;7. Backwards Compatibility&lt;BR /&gt;While a full overhaul could break older scripts, Esri typically needs to maintain continuity. Likely, they would keep the old Raster Calculator tool as-is, but introduce a new advanced environment (like “Raster Analysis Next Gen” or arcpy.rnx) that offers:&lt;/P&gt;&lt;P&gt;A pure-Python approach (or partial rewriting in .NET with Python hooks).&lt;BR /&gt;Direct usage of new features while continuing to support old map algebra expressions for older workflows.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Conclusion&lt;BR /&gt;In summary, a thorough modernization of the Raster Calculator / Map Algebra stack could:&lt;/P&gt;&lt;P&gt;1. Adopt a more Pythonic approach that allows direct usage of standard Python math (including round()).&lt;BR /&gt;2. Integrate with array-based libraries and named dimensions (à la xarray) for modern data science workflows.&lt;BR /&gt;3. Provide consistent chunk-based or GPU-accelerated computations for large data.&lt;BR /&gt;4. Simplify user expressions while still delivering advanced raster operations.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2025 15:48:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/overhaul-raster-calculator/idi-p/1578910</guid>
      <dc:creator>WalkerKB</dc:creator>
      <dc:date>2025-01-25T15:48:16Z</dc:date>
    </item>
  </channel>
</rss>

