rsgb
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
st_bdpolyfromtext(text, integer)
Parameters
Name
Type
Mode
text
IN
integer
IN
Definition
DECLARE geomtext alias for $1; srid alias for $2; mline public.geometry; geom public.geometry; BEGIN mline := public.ST_MultiLineStringFromText(geomtext, srid); IF mline IS NULL THEN RAISE EXCEPTION 'Input is not a MultiLinestring'; END IF; geom := public.ST_BuildArea(mline); IF public.GeometryType(geom) != 'POLYGON' THEN RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead'; END IF; RETURN geom; END;