Makes best efforts to form a valid polygon from 2D or 3D line or area geometry. Works out which are inner and outer rings and, if necessary, reverses the direction of digitising. This can be used to form polygons from existing line-work or to correct problems in an existing area geometry. Any duplicate points, spikes, kickbacks and small rings should be corrected before calling this function. It will fail if any of the rings are open, self-intersecting or intersect with other rings.
Parameter 1: a simple closed line geometry, or a complex line geometry containing one or more rings.
Returns: an area geometry, possibly complex, or null if the rings do not form a valid area geometry.