kopia lustrzana https://github.com/openmaptiles/openmaptiles
Fix park polygon update SQL (#1248)
This PR fixes a bug in the park polygon update code introduced in #1160. Because park polygons at zoom 4 are dissolved, the centroid is not present in the table at that layer. Thus, a separate update trigger is needed to avoid errors. This PR adds the separate trigger for the zoom 4 park layer. This PR likely resolves an unidentified blocker for #1245pull/1250/head^2
rodzic
b4b897999d
commit
718e79a704
|
@ -124,6 +124,16 @@ BEGIN
|
|||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE OR REPLACE FUNCTION update_osm_park_dissolved_polygon_row()
|
||||
RETURNS trigger
|
||||
AS
|
||||
$$
|
||||
BEGIN
|
||||
NEW.tags = update_tags(NEW.tags, NEW.geometry);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE TRIGGER update_row
|
||||
BEFORE INSERT OR UPDATE
|
||||
ON osm_park_polygon
|
||||
|
@ -188,5 +198,5 @@ CREATE TRIGGER update_row
|
|||
BEFORE INSERT OR UPDATE
|
||||
ON osm_park_polygon_gen_z4
|
||||
FOR EACH ROW
|
||||
EXECUTE PROCEDURE update_osm_park_polygon_row();
|
||||
EXECUTE PROCEDURE update_osm_park_dissolved_polygon_row();
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue