I recently upgraded our application from 4.29 to 4.31 and then noticed the results from computeHistograms had changed even though the supplied values did not. When calling computeHistograms in 4.29 with the following method signature I have the following parameters in the network tab:(f, geometryType, geometry, mosaicRule, renderingRule, and pixelSize). in 4.30 the renderingRule is not supplied in the network parameters being sent to the server.
imageServiceLayer.computeHistograms({ geometry: this.geometries, pixelSize: pixelSize})
According to the documentation for ImageHistogramParameters it states the rasterFunction should default to the imageryLayer settings. It seems to be completely omitted. I'm assuming this is a bug?
Specifies the raster function from which to compute the statistics and histogram. The rasterFunction defines how the image should be processed. When a renderingRule is not specified, the current settings on the ImageryLayer will be used.
Solved! Go to Solution.
Hi there,
It appears that the computeHistograms method isn't gathering all the necessary settings from the layer when it's autocast (i.e., when an object is passed directly to the method).
To resolve this, please create a new ImageHistogramParameters instance, rather than relying on autocasting. You can do this with the following code:
const params = new ImageHistogramParameters({
geometry: view.extent,
pixelSize: pixelSize
});
Hi there,
It appears that the computeHistograms method isn't gathering all the necessary settings from the layer when it's autocast (i.e., when an object is passed directly to the method).
To resolve this, please create a new ImageHistogramParameters instance, rather than relying on autocasting. You can do this with the following code:
const params = new ImageHistogramParameters({
geometry: view.extent,
pixelSize: pixelSize
});