예제 #1
0
        private void RefreshViewport()
        {
            CoordEnvelope env = _mosaicFileProvider.Envelope;

            _simpleMapControl.ToViewport(new Core.DrawEngine.CoordEnvelope(env.MinX, env.MaxX, env.MinY, env.MaxY));
            _simpleMapControl.Render();
        }
예제 #2
0
        private void AddOverView(string pngfilename)
        {
            if (!File.Exists(pngfilename))
            {
                return;
            }
            string hdrfilename = pngfilename.Replace(".overview.png", ".hdr");

            if (!File.Exists(hdrfilename))
            {
                return;
            }
            HdrFile hdrFile = HdrFile.LoadFrom(hdrfilename);

            Core.DrawEngine.CoordEnvelope env = CoordEnvelopeFromHdr(hdrFile);
            Bitmap bmp = LoadImage(pngfilename);

            _simpleMapControl.AddImageLayer(pngfilename, bmp, env, true);
            _simpleMapControl.Render();
        }
예제 #3
0
 private void UpdateDrawAOI()
 {
     if (_aoiHost == null)
     {
         return;
     }
     try
     {
         ClearAoiVectorHost(_aoiHost);
         if (rbAllFile.Checked)
         {
             PrjEnvelope prj = _mosaicProjectionFileProvider.ExtendEnvelope;
             if (prj != null)
             {
                 AddAoiToVectorHost(_aoiHost, new PrjEnvelopeItem("AOI", prj));
             }
         }
         else if (rbBlocks.Checked)
         {
             PrjEnvelopeItem[] prjEnvelopeItem = ucPrjEnvelopes1.PrjEnvelopes;
             if (prjEnvelopeItem != null)
             {
                 for (int i = 0; i < prjEnvelopeItem.Length; i++)
                 {
                     AddAoiToVectorHost(_aoiHost, prjEnvelopeItem[i]);
                 }
             }
             _simpleMapControl.Render();
         }
         else
         {
             _simpleMapControl.Render();
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
예제 #4
0
 private void FilterChanged()
 {
     FilterBitMap();
     FilterBlockView();
     _simpleMapControl.Render();
 }