<p dir="ltr">Hi all,</p>
<p dir="ltr">I think the fastest and simplest way to class maps and aerial/satellite is to count number of colors. Generally maps of OSM have a maximum of 20 or may e 30 colors. I don't think OSM will use all 256 colors in their maps.</p>

<p dir="ltr">About k-means, some people use it to filter aerial/satellite with too much clouds (or snow). When the cluster of white and bright colors is too "large" (in histograms) then the raster is considered having too much clouds.<br>

Because maps must be the most readable, colors are visually separated. It may be possible by compute each cluster of each band or compare each border or center of clusters.</p>
<p dir="ltr">Another solution may be to get the quantity or the coverage of some colors. Generally maps have one or few background colors. If one or two colors are very dominant than others, the raster may be considered as a map. I think the minimum is two if a part of the map have some water.</p>

<p dir="ltr">Florent</p>