コード例 #1
0
        public ElevationDataSet(String name, IEnumerable<Int16> rawData, ArcSecondResolution resolution, DecimalGeoCoordinate location, int rowLength)
        {
            if (rawData == null)
                throw new ArgumentNullException("rawData is null");
            if (rowLength <= 0)
                throw new InvalidOperationException("rowLength <= 0");

            _rawData = new List<Int16>(rawData);
            _rowLength = rowLength;
            Name = name;
            Resolution = resolution;
            Location = location;
            IsEmptyDataSet = false;
        }
 /// <summary>
 /// Calculate the row length of the file from the resolution
 /// </summary>
 /// <param name="resolution"></param>
 /// <returns></returns>
 private int GetRowLengthFromResolution(ArcSecondResolution resolution)
 {
     // Set the row length from the resolution
     switch (resolution)
     {
         case ArcSecondResolution.One:
             return ElevationDataConstants.OneArcSecondResolutionRowLength;
         case ArcSecondResolution.Three:
             return ElevationDataConstants.ThreeArcSecondResolutionRowLength;
         default:
             throw new NotImplementedException("Unable to get row length for ArcSecondResolution.Fifteen");
     }
 }