<div dir="ltr">I am posting this email to the developers group because my current comments are more developer related. I am contemplating writing a plugin to make up for the lack of Natural Breaks (Jenks) not in QGIS raster styling. There is a feature request already to have this added as a core capability, but it is unfunded.<div><br></div><div><a href="https://github.com/qgis/QGIS/issues/39746">https://github.com/qgis/QGIS/issues/39746</a></div><div><br></div><div>

I received a request for Jenks raster styling from a team that doesn't really care whether they use QGIS or Arc. They really like the speed of QGIS, but the manager gets the question of why doesn't QGIS have Jenks raster styling because they need it and it is available in Arc.

I have queried some of our folks to see if it is possible to get this funded to be developed in core QGIS, but that process is quite time consuming and wouldn't happen anytime soon so my question for near term use is whether it is worth doing a plugin for it or not. That is really based on the difficulty of implementation. I'm not really supposed to be taking on new QGIS plugin development, but if it doesn't take me too much time, then my management probably won't complain too much. </div><div><br></div><div>I have been looking at the documentation for the QGIS classification methods. I believe these contain all that is needed for doing the raster classification. Am I correct?<br><br>QgsClassificationMethod<br><a href="https://api.qgis.org/api/3.22/classQgsClassificationMethod.html">https://api.qgis.org/api/3.22/classQgsClassificationMethod.html</a><br><br>QgsClassificationJenks<br><a href="https://api.qgis.org/api/3.22/classQgsClassificationJenks.html">https://api.qgis.org/api/3.22/classQgsClassificationJenks.html</a><br><br>It appears that you pass in a List of values and it outputs a list of the ranges. I don't think this needs to be a sorted list. Hopefully that is the case. I think I could use these classification routines for all of the styles it supports and apply them to rasters. This seems to be the process:</div><div><br></div><div>1. From the input raster image copy all the pixel intensities to a List to pass to either QgsClassificationMethod or QgsClassificationJenks.</div><div>2. The output of these classification methods is a list of QgsClassificationRange.</div><div>3. I am guessing that once you get the output classification ranges you would then map them to equal segments of the selected color ramp. You would then add each range to a manual value, color and label.</div><div>4. For Interpolation it probably should be set to either Linear or Discrete. I'm not exactly sure what Mode does and what setting it should be.</div><div><br></div><div>There may be a problem with large images and the large number of pixel values. NODATA values would be skipped. If the imagery gets overly large only decimated pixels would probably be the way to go. How would you developers handle this if the image is large? I wouldn't want to create such a large list to pass to the classification methods that it would crash QGIS or cause problems.</div><div><br></div><div>Am I missing anything that could potentially be a problem?</div><div><br></div><div>Rather than a plugin, how much effort would it take for one of you core QGIS developers to implement and add to QGIS?<br><br>Thanks,</div><div><br></div><div>Calvin<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br></div><div dir="ltr">With Graduated vector symbology there are various modes such as Equal Count, Equal Interval, Logarithmic scale ,Natural Breaks (Jenks), Pretty Breaks, and Standard Deviation to apply the graduated style to the vector data.<div><br></div><div>With raster styling there are only "Interpolation" options Discrete, Linear and Exact, and then the "Mode" of Continuous, Equal Interval, and Quantile.</div><div><br></div><div>Is it possible to implement similar styling methods such as Jenks in raster as you have with vector? Can these styles at least be simulated in some way with how QGIS is now?</div><div><br></div><div>Thanks,</div><div><br></div><div>Calvin</div></div>
</div></div></div>