Skip to content

Commit

Permalink
updated on 20200820 at 12:01:30
Browse files Browse the repository at this point in the history
  • Loading branch information
andreamandrici committed Aug 20, 2020
1 parent a45a527 commit f98c1ae
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flattening/00_create_infrastructure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,14 @@ THEN
ELSE
FOR rec IN SELECT fid,geom FROM iselect ORDER BY fid
LOOP
BEGIN
INSERT INTO iout
SELECT fid,UNNEST(path) path,geom FROM (SELECT fid,(ST_DUMP(ST_MULTI(geom))).* FROM (SELECT fid,ST_INTERSECTION(ttile,geom) geom FROM iselect WHERE fid=rec.fid) c) d;
EXCEPTION
WHEN OTHERS THEN
INSERT INTO iout
SELECT fid,UNNEST(path) path,geom FROM (SELECT fid,(ST_DUMP(ST_MULTI(geom))).* FROM (SELECT fid,ST_INTERSECTION(ttile,st_buffer(geom,0)) geom FROM iselect WHERE fid=rec.fid) c) d;
END;
END LOOP;
END IF;
EXECUTE FORMAT ('INSERT INTO %s(qid,fid,path,geom) SELECT %s,* FROM iout order by fid,path;',otbl,iqid);
Expand Down
Binary file modified preprocessing/wdpa_geom_202006_nvalid_points.gpkg
Binary file not shown.
Binary file not shown.
Empty file.

0 comments on commit f98c1ae

Please sign in to comment.