Skip to content

Commit 0fa1821

Browse files
committed
check selected polygon instead of all
1 parent e3c67e3 commit 0fa1821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function list_overlaps(layer_id) {
327327
se as (SELECT the_geom FROM al WHERE id = '${layer_id}' AND namecol = '${district_id}'),
328328
inter as
329329
(SELECT DISTINCT al.id, al.namecol, al.namealt,
330-
ST_Area(al.the_geom) as area, ST_Area(ST_Intersection(al.the_geom, se.the_geom)) as searea
330+
ST_Area(se.the_geom) as area, ST_Area(ST_Intersection(al.the_geom, se.the_geom)) as searea
331331
FROM al, se
332332
WHERE ST_Intersects(al.the_geom, se.the_geom))
333333
SELECT * FROM inter WHERE searea / area > .005

0 commit comments

Comments
 (0)