Schema
Owner
postgres
Descriptions
args: toponame - Find and register all faces defined by topology edges
Options
Option | Value |
---|---|
Returns |
text |
Language |
|
Parameters |
toponame varchar |
Definition
CREATE OR REPLACE FUNCTION topology.polygonize (
toponame varchar
)
RETURNS text AS
$span$
DECLARE
sql text;
rec RECORD;
faces int;
BEGIN
sql := 'SELECT (st_dump(st_polygonize(geom))).geom from '
|| quote_ident(toponame) || '.edge_data';
faces = 0;
FOR rec in EXECUTE sql LOOP
BEGIN
PERFORM topology.AddFace(toponame, rec.geom);
faces = faces + 1;
EXCEPTION
WHEN OTHERS THEN
RAISE WARNING 'Error registering face % (%)', rec.geom, SQLERRM;
END;
END LOOP;
RETURN faces || ' faces registered';
END
$span$
LANGUAGE 'plpgsql'
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
COST 100;
COMMENT ON FUNCTION topology.polygonize(toponame varchar)
IS 'args: toponame - Find and register all faces defined by topology edges';
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 07/12/2018 13:23 |