Overly complicated way of "pick a postcode that is a) inside the (multi-)polygon and b) far away from edges"
✓ Published0🌍 Public
GGeoWill
Last edited Jan 8, 2021
Created on Jan 8, 2021
A static map highlights postcodes within a chosen administrative boundary by rendering the polygon's internal buffer and displaying point locations that fall inside it. The SQL query first simplifies the largest polygon part, then computes a buffer distance based on the average bounding box dimensions. It uses PostGIS functions like `st_buffer`, `st_simplify`, and `st_within` to filter UK postcode points from the `uk_geo_utils_onspd` dataset, returning a single matching postcode and its geometry. The result shows only the buffered region and the selected point, not the original boundary.
AI-generated description