TileCook.GridSet.GridSet C# (CSharp) Method

GridSet() public method

public GridSet ( string name, string srs, Envelope envelope, IList resolutions, int tileWidth = 256, int tileHeight = 256, double pixelSize = .00028, bool topOrigin = false ) : System
name string
srs string
envelope Envelope
resolutions IList
tileWidth int
tileHeight int
pixelSize double
topOrigin bool
return System
        public GridSet(string name, string srs, Envelope envelope, IList<double> resolutions, int tileWidth = 256, int tileHeight = 256, double pixelSize = .00028, bool topOrigin = false)
        {
            // Set name
            if (string.IsNullOrEmpty(name))
                throw new ArgumentNullException("GridSet Name cannot be null or empty");
            this._name = name;

            // set SRS
            if (string.IsNullOrEmpty(srs))
                throw new ArgumentNullException("GridSet SRS cannot be null or empty");
            this._srs = srs;

            // set Envelope
            if (envelope == null)
                throw new ArgumentNullException("GridSet Envelope cannot be null");
            this._envelope = envelope;

            // Set resolutions list
            if (resolutions == null)
                throw new ArgumentNullException("GridSet Resolutions cannot be null");
            this._resolutions = resolutions as List<double>;

            // Set tile sizes
            if (tileWidth <= 0)
                throw new ArgumentOutOfRangeException("GridSet TileWidth must be greater than 0");
            this._tileWidth = tileWidth;
            if (tileHeight <= 0)
                throw new ArgumentOutOfRangeException("GridSet TileHeight must be greater than 0");
            this._tileHeight = tileHeight;

            // Set pixelSize
            if (pixelSize <= 0)
                throw new ArgumentOutOfRangeException("PixelSize must be greater than 0");
            this._pixelSize = pixelSize;

            // Set top orgin
            this._topOrigin = topOrigin;
        }