Select to view content in your preferred language

Visualize polygons as points for symbology on the fly

667
2
05-18-2023 05:57 AM
Status: Open
Tiff
by
Frequent Contributor

I would like to be able to symbolize a polygon as a point using its centroid, for example, in a web map. This is especially helpful if you want a zoomed out view for your map to start and have it transition into polygons as you zoom closer. This seems like a small but very helpful visualization option for many use cases.

2 Comments
DataOfficer

We have a somewhat hacky workaround for this.
Firstly ensure there is some sort of numeric field in your attribute table. In our case, we give all features a value of 1 in this field.

Then, in the symbology (assuming using Map Viewer), choose the attributes to symbolise by. In our case, we have a categorical field (text) and our numeric field mentioned above, called Point.
Then, pick the Types and Size style. Open the style options.

Under Types, set up the styling for your categorical field (if you have one). This will be the symbology when you are zoomed in to the polygon.

Under Count and Amounts (size), choose a symbol style, and set the size range to be the same for all values (unless you want it to vary). For example, we set our points to all be 20px. Zoomed out, we see the points, and zoomed in, we see the polygon with the point in the centre.

Tiff
by

Hi @DataOfficer, this is helpful - thanks! I've implemented this for a couple maps already.

I am having issues with all the points showing up and I only have 25 features within an entire county. Depending on my zoom level, I only see some and not others, even if I reduce the point size to make sure they don't overlap. It looks like it is just dynamically changing based on the zoom extent. This makes it a problem for when you are not seeing the full distribution of these features when some points are somehow not showing up at that zoom extent. Have you experienced this, or have any suggestions for me?