...
Of note is the SQL used in the DATA
statement which creates a row per ward with a point within each ward polygon which will be used for the lookup. The PostGIS function ST_PointOnSurface
returns a POINT
guaranteed to lie on the surface of a polygon.
Code Block | ||
---|---|---|
| ||
SELECT ogc_fid, code, name, ST_PointOnSurface(wkb_geometry) AS wkb_geometry FROM boundaryline.wards_surrey |
...