<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Cory,</p>
<p>Perhaps not exactly what you want - but did you also look at the point cluster renderer?</p>
<p>If you use that, points are clustered at small map scales, but are shown individually if you zoom in further.</p>
<p>It might help a bit in your situation.</p>
<p>Andreas</p>
<p id="reply-intro">On 2021-02-02 17:20, Cory Albrecht wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div>
<div dir="ltr">
<div class="v1gmail_default" style="font-family: monospace;">Hello all,</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">I am looking for a way to control symbol rendering in a way similar to how labels are omitted ot not to prevent collision.</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">I want to use the GeoNames data to populating cities, towns, etc... on my maps, but there are still millions of points even after filtering for populated places. This is what a section of the map from Dakotas/Montana/Wyoming looks like now, with a confused mess of overlapping symbols. It's worse on the coasts. BTW, this layer is a points layer.</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;"><img src="cid:161228787260198f8069a06525408114@carto.net" alt="image.png" width="284" height="182" /></div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">First I thought maybe Scale-based rendering by population size, but that doesn't work, because farther out zoom levels there'd still be a mess of overlapping symbols in heavily populated places like NYC or LA, and in less populated places the smaller cities and towns that are important wouldn't even show (like that black dot, which is Rapid City, SD) even though there would be plenty of room for them.</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">I can control the rendering order based on population size, so is there a way to control whether a not a symbol gets rendered based on what has already been drawn, but ignoring what has yet to be rendered?</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">I'm imagining a set of stops similar to this:</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">
<ul>
<li>iterate through all items in order of the population attribute</li>
<li>get the current item's location where it would potentially be rendered on the map</li>
<li>has anything been rendered already within 5mm (or whatever) of that location?</li>
<li>if yes, go to next item without rendering this one</li>
<li>if no, then render it's symbol</li>
<li>continue to next item</li>
</ul>
</div>
<div class="v1gmail_default" style="font-family: monospace;">So after that dot which is Rapid City gets rendered, but then those overlapping circles do not until you finally get to one with a centre 5mm away from the centre of the Rapid City dot.</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">While googling I found the refFunctions plugin which adds some functions dealing with overlaps, but since the layer is composed of points, nothing really overlaps. Also, adding something like `<em>...AND (population >= array_max(geomoverlaps('cities','population')))</em>` to a rule in Symbology to exclude/include things for rendering looks at everything without distinguishing between already rendered and yet to be rendered, like I need.</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">Am I thinking about this wrong and am thus missing something obvious? I know I only use a small portion of QGIS's capabilites, so maybe there's a tool/capability I haven't discovered yet because I haven't needed it until now?</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
<div class="v1gmail_default" style="font-family: monospace;">The layer is a PostGIS layer and this would seem to be a wholly QGIS problem, but maybe I am wrong on that, too? Maybe there's a way of passing the map scale in the SQL query ('SELECT *, 1.0 as map_scale FROM...') so that some weird WHERE clause would do the filtering there? That seems unlikely and a bit crazy, but who knows?</div>
<div class="v1gmail_default" style="font-family: monospace;"> </div>
</div>
</div>
</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br />Qgis-user mailing list<br /><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</blockquote>
<p><br /></p>

</body></html>