<?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 Can a python raster function operate on specific layers in a mosaic dataset? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/can-a-python-raster-function-operate-on-specific/m-p/758000#M58511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a python raster function that would be applied to a mosaic dataset, to do some relatively simple on-the-fly processing and display/output the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm unclear how (or if possible) to pass in specific layers in the mosaic dataset, as a result of either a query on the MD's attribute table, or as a result of specifying the date and dimension - I can (and have) setup the mosaic dataset as multidimensional, with two variables, and time as the dimension. (not sure if that helps or hinders).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The .getConfiguration method has an extractBands attribute, that is close to what I want. But the data don't have bands. So perhaps one solution is to setup some sort of dummy band structure, but I think that would get overly complicated to read the data in that way.&amp;nbsp; I'd rather just be able to directly set a query on the mosaic dataset attributes to define the raster layer returned from the MD. Or on the multidimensional variables/dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's also the selectRasters method, but I don't see much documentation on that...the example just shows it selecting one of two already input/defined rasters: &lt;A href="https://github.com/Esri/raster-functions/wiki/PythonRasterFunction#selectrasters" title="https://github.com/Esri/raster-functions/wiki/PythonRasterFunction#selectrasters"&gt;PythonRasterFunction · Esri/raster-functions Wiki · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could also break the mosaic dataset into two separate MDs, one per variable, but I'd still need to select on time...and in this case, I cant just use the time properties to select the time, as I specifically need to access data from both the current day (which could be set using time slider etc) AND the previous day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible? Or am I on the wrong track here and there's some other better way to go about running a raster function on specific layers (defined by input parameters) in a mosaic dataset?&amp;nbsp; In the end, the idea would be to set this up as a processing template on the mosaic dataset, that a user would then set the parameters for.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2015 19:33:38 GMT</pubDate>
    <dc:creator>DanSlayback</dc:creator>
    <dc:date>2015-05-21T19:33:38Z</dc:date>
    <item>
      <title>Can a python raster function operate on specific layers in a mosaic dataset?</title>
      <link>https://community.esri.com/t5/python-questions/can-a-python-raster-function-operate-on-specific/m-p/758000#M58511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a python raster function that would be applied to a mosaic dataset, to do some relatively simple on-the-fly processing and display/output the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm unclear how (or if possible) to pass in specific layers in the mosaic dataset, as a result of either a query on the MD's attribute table, or as a result of specifying the date and dimension - I can (and have) setup the mosaic dataset as multidimensional, with two variables, and time as the dimension. (not sure if that helps or hinders).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The .getConfiguration method has an extractBands attribute, that is close to what I want. But the data don't have bands. So perhaps one solution is to setup some sort of dummy band structure, but I think that would get overly complicated to read the data in that way.&amp;nbsp; I'd rather just be able to directly set a query on the mosaic dataset attributes to define the raster layer returned from the MD. Or on the multidimensional variables/dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's also the selectRasters method, but I don't see much documentation on that...the example just shows it selecting one of two already input/defined rasters: &lt;A href="https://github.com/Esri/raster-functions/wiki/PythonRasterFunction#selectrasters" title="https://github.com/Esri/raster-functions/wiki/PythonRasterFunction#selectrasters"&gt;PythonRasterFunction · Esri/raster-functions Wiki · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could also break the mosaic dataset into two separate MDs, one per variable, but I'd still need to select on time...and in this case, I cant just use the time properties to select the time, as I specifically need to access data from both the current day (which could be set using time slider etc) AND the previous day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible? Or am I on the wrong track here and there's some other better way to go about running a raster function on specific layers (defined by input parameters) in a mosaic dataset?&amp;nbsp; In the end, the idea would be to set this up as a processing template on the mosaic dataset, that a user would then set the parameters for.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 19:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-a-python-raster-function-operate-on-specific/m-p/758000#M58511</guid>
      <dc:creator>DanSlayback</dc:creator>
      <dc:date>2015-05-21T19:33:38Z</dc:date>
    </item>
  </channel>
</rss>

