Esempio n. 1
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.Filter = "Geo Image Files(*.IMG;*.TIF)|*.IMG;*.TIF";
            dialog.Title  = "Select a image files";

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                if (GdalImage.IsValidImage(dialog.FileName))
                {
                    _Img = new GdalImage(dialog.FileName);

                    grpBxOptions.Enabled  = true;
                    btnSelectPath.Enabled = true;

                    FuncStatusText(string.Format("Getting description\r\n{0}...", dialog.FileName));

                    // pctBoxImg.Image = _Img.GetBitmap(pctBoxImg.Size, null, 0);
                    _Img.Warp("EPSG:4326");
                    //pctBoxImg.Image = _Img.GetNonRotatedPreview(new Size(_Img.Width / 20, _Img.Height / 20), _Img.Extent);
                    ShowDescriptImg();
                    SetItemCmbOrder();

                    txtBxStatus.Text = "";
                }
                else
                {
                    txtBxStatus.Text = string.Format("Invalid Format image\r\n{0}", dialog.FileName);
                }
            }
        }
Esempio n. 2
0
        public GdalToTilesForm()
        {
            InitializeComponent();
            _Img = null;

            GdalConfiguration.ConfigureAll();

            SetItemCmbSD();
            SetItemCmbSizeTile();
        }