Select to view content in your preferred language

Filter by extent does not update the chart when the geographic extent is changed

1885
8
05-12-2020 04:51 PM
JamesKapetsky
Deactivated User

I am using ArcGIS Pro 2.5. I am using Interact with a chart (https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/charts/interact-with-a-chart.htm) in the Section "Filter by Extent". When I change the geographic extent of the map, the chart does not redraw to reflect the new extent.

0 Kudos
8 Replies
MervynLotter
Frequent Contributor

Hi James

I have created a short 40 second video to demonstrate how Filter by Extent and Filter by Selection works using a scatter plot. 

Mervyn

0 Kudos
JamesKapetsky
Deactivated User

Hello Mervyn,

Thank you very kindly for your response.

Your video was very helpful in providing a benchmark for me to test a shp by following your steps.

If you have the time and patience, I would be very grateful if you could examine the steps that I have followed and compare them with the results you get when working with a raster in Interact with a chart

Here is what I have done in ArcGIS Pro 2.5.1:

Setup: Checked in the Contents Pane is a National Agriculture Imagery Program digital quad multiband raster in tif format and its Band 1. This file is straight from the Earth Explorer download and unzip. I have used copies of this file many times w/o difficulty in Manifold GIS and QGIS, so the problems I am experiencing should not be to do with the file.

The NAIP appears in the Map window. I Rt Clk, Create Chart, Select Histogram. In the Chart Properties Pane – Data, I select Band 1 under Number. I make no transformation. I check Mean and Std Dev. The Statistics are visible and a histogram is made according to the indicated checks.

I am now referring to, and following step by step Interact with a chart ( <https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/charts/interact-with-a-chart.htm> https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/charts/interact-with-a-chart.htm),

Selection Step 1 – The chart pane title is lit. Below it, the Select Mode button is greyed out. I touch it and a blue background shows. The moment the pointer leaves the button, it reverts to being greyed out. The pointer does not take on the appearance of the Select Mode button.

The Reset Navigation Button works.

Contrary to the keyboard shortcuts shown in the table at the end of this section of the Help, with a left mouse button drag nothing happens. With a right drag the columns I touch are highlighted and a pop out gives the range and count on each column as I hover it. Those selected columns are zoomed at the same time.

Selection Step 2 – The pointer does not show that it is in selection mode by taking on the same symbol as the Selection Mode button.. Click and drag does not work to create a rectangle to select a few columns in the histogram and neither does click to select one of them.

Zoom Step 1 - The zoom button lights only with the cursor on it; however, now the cursor has become the same symbol as the Zoom Button. Paused over a column, a pop out appears with the range and count on the column. When I click and drag, I can highlight columns moving left and right that then zoom, but I cannot draw a rectangle. I can return to the original histogram extent with the Reset Navigation Button.

Testing the keyboard shortcuts in the table at the end of the Help

Select mode – Lbd – no response; Rbd – OK

Zoom mode – Lbd and Rbd – both OK

Any mode – (zoom mode selected)

Lbd + Shift – OK

Wbs - OK

Wbd – no response

Lbd + C – The pan symbol appears, but there is no response when it is dragged

Insert - OK

Filter

The same multiband raster is checked in Contents as described above and is being used for the Chart and the histogram.

Range Slider – this does not seem to be set up in AGP as described in the Help. Double clicking gives me Layer Properties, but there is no separate Range in the left pane. Under General in the right pane there are drop downs to set minimum and maximum scale. This function of no immediate interest to me.

Filter by Extent --- this is very important for my work

I am in the Chart Pane with the title line highlighted and the histogram showing. The map window shows the multiband NAIP tif in its full extent. Filter: is in bold and Extent is greyed out. When I touch Extent a blue rectangle appears around it. I go the Map window and change the extent of the raster by zooming in. I return to the chart pane and highlight the chart title at the top of the chart pane. Filter by extent does not update the histogram when the geographic extent is changed as described below in the Help:

The Help states “When Filter by Extent is enabled, the chart only draws based on features in the current visible geographic extent of the map. As you pan and zoom the map to different spatial extents, the chart redraws to reflect the new extent”

Filter by Selection

I have deleted the histogram created above to make a clean start. I create a new histogram with the same specs as above.

The Help states “When Filter by Selection is enabled, the chart only draws features that are currently selected. The selection can be made in the map, the attribute table, or another chart created from the same layer.”

With the chart pane highlighted Filter: is in bold, Filter By Selection is fully greyed out, and Extent does not have a box around it. I am unable to proceed because I cannot enable Filter by Selection in the chart pane.

Many kind thanks for your time and effort

Jim

0 Kudos
MervynLotter
Frequent Contributor

Hi James

Working with rasters is a different ball game and charts do generally work differently. With rasters you have a limited set of chart options and you generally first define an area of interest (so limiting the number of pixels it has to load), before you can interact with the data in a chart.

But having said that, when working with rasters the histogram chart does appear to offer all of the same functionality as for vector data but the Filter by Selection is not working for me either. I tested your workflow using a Landsat image and I could not get it to work. Perhaps this is by design - I hope someone from Esri can advise us.

Regarding Filter by Selection, this does work nicely but then you need a raster with an attribute table. Selection works on the attribute table and not the pixels (as with vector data), and with rasters you can use GP tools such as Select by Attributes if you have an attribute table.

If needed, there is a GP tool called Build Raster Attribute Table but it only works on single band rasters.

I am not sure of your required workflow but perhaps take a look at a Scatter Plot (requires that you select 2 bands). What I like a lot about it is that if you have a polygon layer in your Contents pane with your areas of interest, then if you first click on the Feature Selector under Define an area of interest, and then click on the polygon within your map view, it will only chart the pixel values for the respective polygon area.  

Then regarding your comment about Range Sliders. These are only available for vector datasets and only for attributes with integer values (so no decimal values).

Do take a look at Raster Functions as they offer a lot of great functionality when working with raster data. Do see Raster functions—ArcGIS Pro | Documentation 

Regards

Mervyn 

0 Kudos
MervynLotter
Frequent Contributor

Thinking more about it, if you really do require a histogram for a certain area, then I have a workaround.

  1. From the Imagery tab select the Raster Functions option. 
  2. This opens up the Raster Functions pane and search for Clip.
  3. Add your raster under "Raster" and then browse to your required extent. Then click on the rather non-descript map-like icon in bottom right which will "Capture Current Map Extent".
  4. Click on Create new Layer at bottom of pane and a virtual new raster layer will be created and added to you map and Content pane that does not take up any disk space. 
  5. Then right-click on this new raster function layer and choose Create Chart>Histogram
  6. Select your band number and your histogram will be created that honours the map extent used in the Clip raster function. 
  7. You can then always right-click on your new raster function layer under Content pane and Edit Function Chain. Changing the extent will automatically update the histogram but you must first click Apply after editing the extent of the Clip raster function.
0 Kudos
JamesKapetsky
Deactivated User

Hi Mervyn,

Thanks for that procedure.

I have gone through the steps four times. All OK until the Step 7

When I am in the Edit Function Chain I reduce the Clip rectangle with the handles. The Apply button is greyed out. It remains greyed out after I press it.

I return to the Histogram Pane. I change the extent of the raster in the map. There is no response.

Very sorry for the hassle!

Regards,

Jim

0 Kudos
MervynLotter
Frequent Contributor

Hi Jim

Sorry, I did not provide too many details for step 7, it was added as a bit of an afterthought.

  1. So once you have the Clip raster function (RF) set and it is working, then zoom/pan to a new area and then right click on layer in Contents pane and select Edit Raster Chain.
  2. This opens up a view similar to ModelBuilder where you can string RFs together. But we wont worry about that now. Right click on the yellow block labelled Clip, and select Properties
  3. Then click on the map-like Capture Current Map Extent button to update the Output Extent. You should see the extent values change. 
  4. Click OK to close the RF parameters dialogue and then click on the blue side arrow button called Apply
  5. The Histogram should update and you can then choose to close RF edit chain view or continue to zoom to a new area. 

Good luck and let me know if you have any problems. 

0 Kudos
JamesKapetsky
Deactivated User

Hi Mervyn,

Worked!

Many kind thanks for your patience and ingenuity.

Jim

0 Kudos
MervynLotter
Frequent Contributor

Excellent, glad it worked and I also learnt something.

0 Kudos