|
Overview
The Show My function in My House by default uses a Point in Polygon search to return results. What this guide aims to do is to show you how you can create a My House Polygon in Polygon search.
Say you wish to show all Planning Applications which intersect the BLPU Polygons of a property rather than just the BLPU Seed point.
The following steps assume that you:
This is possible when using a My House Classic Layer by using SQL to return a row per Planning Application which intersects each BLPU Polygons with the geometry being the BLPU Polygon not the Planning Application geometry. This can be achieved editing the DATA MapServer LAYER Object object in the .MAP file
Add a new LAYER to the .MAP file and in the DATA entry add the following:
DATA "wkb_geometry from (select row_number() over () as ogc_fid, b.wkb_geometry, p.planref, p.name from demo_planning.blpu_polygons b inner join demo_planning.planning_applications p on st_intersects(b.wkb_geometry, p.wkb_geometry)) as foo using unique ogc_fid using srid=27700" |