Mercurial > gemma
changeset 5188:f742b5cf9a64 new-fwa
Merged default into new-fwa branch.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 02 Apr 2020 11:40:21 +0200 |
parents | 5f4d054fea31 (current diff) 20f338cb4d48 (diff) |
children | 5c52d6d69545 |
files | |
diffstat | 3 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/lib/geo.js Wed Apr 01 15:38:20 2020 +0200 +++ b/client/src/lib/geo.js Thu Apr 02 11:40:21 2020 +0200 @@ -23,7 +23,7 @@ import { lineString as turfLineString, point as turfPoint, - polygon as turfPolygon + multiPolygon as turfMultiPolygon } from "@turf/helpers"; import Feature from "ol/Feature"; @@ -189,7 +189,7 @@ // uses turfjs distance() function let fairwayCoordinates = []; var line = turfLineString(profileLine.getCoordinates()); - var polygon = turfPolygon(fairwayGeometry.getCoordinates()); + var polygon = turfMultiPolygon(fairwayGeometry.getCoordinates()); var intersects = lineIntersect(line, polygon); let opts = { units: "meters" };
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/updates/1438/01.remove_duplicate_fairway_areas.sql Thu Apr 02 11:40:21 2020 +0200 @@ -0,0 +1,9 @@ +-- Remove entries that do not suffice the requirements set out by the +-- constraint trigger on fairway_dimensions, but that could be left over +-- from an import run before the constraint trigger was in place +DELETE FROM waterway.fairway_dimensions fd + USING waterway.fairway_dimensions fd_self + WHERE ST_Equals(CAST(fd.area AS geometry), CAST(fd_self.area AS geometry)) + AND fd.validity && fd_self.validity + AND fd.staging_done = fd_self.staging_done + AND fd.id < fd_self.id