Beispiel #1
0
        private void SetXYNum()
        {
            Single minX, maxX, minY, maxY;
            Single XSize, YSize;
            int    XNum, YNum;

            minX  = Convert.ToSingle(TB_MinX.Text);
            maxX  = Convert.ToSingle(TB_MaxX.Text);
            minY  = Convert.ToSingle(TB_MinY.Text);
            maxY  = Convert.ToSingle(TB_MaxY.Text);
            XSize = Convert.ToSingle(TB_XSize.Text);
            YSize = Convert.ToSingle(TB_YSize.Text);

            XNum = Convert.ToInt32((maxX - minX) / XSize);
            YNum = Convert.ToInt32((maxY - minY) / YSize);

            maxX = minX + XNum * XSize;
            maxY = minY + YNum * YSize;

            XNum        += 1;
            YNum        += 1;
            TB_XNum.Text = XNum.ToString();
            TB_YNum.Text = YNum.ToString();

            TB_MaxX.Text = maxX.ToString();
            TB_MaxY.Text = maxY.ToString();
        }
Beispiel #2
0
        /// <summary>
        /// Generate data info text
        /// </summary>
        /// <returns>info text</returns>
        public override string GenerateInfoText()
        {
            string dataInfo;

            dataInfo  = "File Name: " + FileName;
            dataInfo += Environment.NewLine + "Data Type: ASCII Grid";
            dataInfo += Environment.NewLine + "XNum = " + XNum.ToString() +
                        "  YNum = " + YNum.ToString();
            dataInfo += Environment.NewLine + "XMin = " + XMin.ToString() +
                        "  YMin = " + YMin.ToString();
            dataInfo += Environment.NewLine + "XSize = " + XDelt.ToString() +
                        "  YSize = " + YDelt.ToString();
            dataInfo += Environment.NewLine + "MissingValue = " + MissingValue.ToString();

            return(dataInfo);
        }