Skip to content

Commit

Permalink
Bump version to 0.99.8
Browse files Browse the repository at this point in the history
* Fix overlap query again? (comstud)
  • Loading branch information
comstud committed Mar 16, 2024
1 parent 9bededb commit 38846d8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions db_store/sql/4_overlap_fix.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Fix procedure for overlap disablement
-- I guess ST_Overlaps() is false if fully contained?
-- So, just check we have Poly/MPoly before doing ST_Area().
DROP PROCEDURE IF EXISTS fl_nest_filter_overlap;
CREATE PROCEDURE fl_nest_filter_overlap (IN maximum_overlap double)
BEGIN
DROP TEMPORARY TABLE IF EXISTS overlapNest;
CREATE TEMPORARY TABLE overlapNest AS (
SELECT b.nest_id
FROM nests a, nests b
WHERE a.active = 1 AND b.active = 1 AND
a.m2 > b.m2 AND
ST_Intersects(a.polygon, b.polygon) AND
ST_GeometryType(ST_Intersection(a.polygon, b.polygon)) IN ('Polygon', 'MultiPolygon') AND
(100 * ST_Area(ST_Intersection(a.polygon,b.polygon)) / ST_Area(b.polygon)) > maximum_overlap
);
UPDATE nests a, overlapNest b SET a.active=0, discarded = 'overlap' WHERE a.nest_id=b.nest_id;
DROP TEMPORARY TABLE overlapNest;
END
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package version

const (
APP_VERSION = "0.99.7"
APP_VERSION = "0.99.8"
)

0 comments on commit 38846d8

Please sign in to comment.