Mercurial > gemma
diff schema/gemma.sql @ 5030:737d7859dd86
Store fairway dimensions as MultiPolygon
This avoids storing a single invalid geometry from the data source
as multiple valid geometries with duplicate attribute sets.
The previous behaviour was not correctly handled in import tracking,
because only the ID of the first item in a set of multiple geometries
generated from a single entry from the data source was tracked.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 18 Mar 2020 18:42:30 +0100 |
parents | cf25b23e3eec |
children | 8c590ef35280 |
line wrap: on
line diff
--- a/schema/gemma.sql Wed Mar 18 18:10:19 2020 +0100 +++ b/schema/gemma.sql Wed Mar 18 18:42:30 2020 +0100 @@ -707,7 +707,7 @@ CREATE TABLE fairway_dimensions ( id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - area geography(POLYGON, 4326) NOT NULL + area geography(MULTIPOLYGON, 4326) NOT NULL CHECK(ST_IsValid(CAST(area AS geometry))), level_of_service smallint NOT NULL REFERENCES levels_of_service, min_width smallint NOT NULL,