Naive dispersal of overlapping points in PostGIS
✓ Published0🌍 Public
CCaged
Last edited May 16, 2015
Created on May 16, 2015
This example shows how to disperse overlapping point markers that share identical coordinates in a PostGIS database. It first groups points that occupy the same location and counts their multiplicity, then creates buffer polygons whose sizes scale with the number of overlapping points. Using a custom `RandomPoint` function, it randomly relocates each original point within its corresponding buffer, effectively separating coincident markers so all inspections become visible. The visualization relies on PostGIS spatial SQL queries—including `st_equals`, `st_buffer`, and `st_contains`—to generate the dispersal, with the random-point logic implemented in PL/pgSQL and executed directly in the database.
AI-generated description