<?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 Accessing RasterFunction Classifications through get_samples? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/accessing-rasterfunction-classifications-through/m-p/1367004#M9481</link>
    <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I am trying to classify some points based off of their wildfire risk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the ImageryLayer provided by the US Forest Service (&lt;A href="https://www.arcgis.com/home/item.html?id=9274dfe5318540d7a09f0117c0be0730" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=9274dfe5318540d7a09f0117c0be0730&lt;/A&gt;) which appears to have a Raster Function applied that classifies the pixel values into different categories.&lt;/P&gt;&lt;P&gt;Is there a way to access this categorization or the fields that are generated by the Raster Function using get_samples?&lt;/P&gt;&lt;P&gt;See this snippet from a web map for the fields I am after.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zlans15_0-1704487989972.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90722iD4A5CE6AFB5B197D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zlans15_0-1704487989972.png" alt="zlans15_0-1704487989972.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code outputs a dictionary response:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;wf_risk_item = gis.content.get(9274dfe5318540d7a09f0117c0be0730)
wf_risk_layer = wf_risk_item.layers[0]

wf_risk_layer.get_samples(test_geom, out_fields = '*')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;[{'location': {'x': -81.46579,
'y': 31.251772,
'spatialReference': {wkid': 4326, latestWkid': 4326}},
'locationId': 0,
'value': '132',
'rasterId': 1,
'resolution': 30,
'attributes': {'Name': 'WHP_CONUS_reclassed',
'MinPS': 0,
'MaxPS': 19200,
'LowPS': 30,
'HighPS': 1920,
'Category': 1,
'Tag':'Dataset'
'GroupName': '',
'ProductName': '',
'CenterX': -10746853.616312053,
'CenterY': 4796876.014940174,
'ZOrder': None,
'Shape_Length': 19418521.666981366,
'Shape Area': 22477410469388.316},
'values': [132.01]}]&lt;/LI-CODE&gt;&lt;P&gt;However, none of the attributes or the values returned match with the Raster.Fields. Is there a way to access these?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2024 21:04:21 GMT</pubDate>
    <dc:creator>zlans15</dc:creator>
    <dc:date>2024-01-05T21:04:21Z</dc:date>
    <item>
      <title>Accessing RasterFunction Classifications through get_samples?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/accessing-rasterfunction-classifications-through/m-p/1367004#M9481</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I am trying to classify some points based off of their wildfire risk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the ImageryLayer provided by the US Forest Service (&lt;A href="https://www.arcgis.com/home/item.html?id=9274dfe5318540d7a09f0117c0be0730" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=9274dfe5318540d7a09f0117c0be0730&lt;/A&gt;) which appears to have a Raster Function applied that classifies the pixel values into different categories.&lt;/P&gt;&lt;P&gt;Is there a way to access this categorization or the fields that are generated by the Raster Function using get_samples?&lt;/P&gt;&lt;P&gt;See this snippet from a web map for the fields I am after.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zlans15_0-1704487989972.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90722iD4A5CE6AFB5B197D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zlans15_0-1704487989972.png" alt="zlans15_0-1704487989972.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code outputs a dictionary response:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;wf_risk_item = gis.content.get(9274dfe5318540d7a09f0117c0be0730)
wf_risk_layer = wf_risk_item.layers[0]

wf_risk_layer.get_samples(test_geom, out_fields = '*')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;[{'location': {'x': -81.46579,
'y': 31.251772,
'spatialReference': {wkid': 4326, latestWkid': 4326}},
'locationId': 0,
'value': '132',
'rasterId': 1,
'resolution': 30,
'attributes': {'Name': 'WHP_CONUS_reclassed',
'MinPS': 0,
'MaxPS': 19200,
'LowPS': 30,
'HighPS': 1920,
'Category': 1,
'Tag':'Dataset'
'GroupName': '',
'ProductName': '',
'CenterX': -10746853.616312053,
'CenterY': 4796876.014940174,
'ZOrder': None,
'Shape_Length': 19418521.666981366,
'Shape Area': 22477410469388.316},
'values': [132.01]}]&lt;/LI-CODE&gt;&lt;P&gt;However, none of the attributes or the values returned match with the Raster.Fields. Is there a way to access these?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 21:04:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/accessing-rasterfunction-classifications-through/m-p/1367004#M9481</guid>
      <dc:creator>zlans15</dc:creator>
      <dc:date>2024-01-05T21:04:21Z</dc:date>
    </item>
  </channel>
</rss>

