/** * Class constructor. * * The coordinate system of each of the rings must match the one of the Polygon. * * @param CoordinateSystem $cs The coordinate system of the Polygon. * @param LineString ...$rings The rings that compose the Polygon, the first one being the exterior ring. * * @throws InvalidGeometryException If the resulting geometry is not valid for a sub-type of Polygon. * @throws CoordinateSystemException If different coordinate systems are used. */ public function __construct(CoordinateSystem $cs, LineString ...$rings) { parent::__construct($cs, !$rings); if (!$rings) { return; } CoordinateSystem::check($this, ...$rings); $this->rings = $rings; }
/** * Class constructor. * * The coordinate system of each of the patches must match the one of the PolyhedralSurface. * * @param CoordinateSystem $cs The coordinate system of the PolyhedralSurface. * @param Polygon ...$patches The patches that compose the PolyhedralSurface. * * @throws CoordinateSystemException If different coordinate systems are used. */ public function __construct(CoordinateSystem $cs, Polygon ...$patches) { parent::__construct($cs, !$patches); if (!$patches) { return; } CoordinateSystem::check($this, ...$patches); $this->patches = $patches; }