Exemple #1
0
        /// <summary>
        /// This starts the actual "shapefile to grid" calculation.
        /// Displays a Progress form showing calculation progress and
        /// status.
        /// </summary>
        public void DoShapefileToGrid2()
        {
            m_ProgressForm = new frmProgress();
            m_ProgressForm.Show();

            Rasterizer ras = new Rasterizer();
            bool       flg = false;

            flg = ras.ShapefileToGrid2(m_ShpFileName, m_GridFileName, m_GridFileType, m_GridDataType,
                                       m_FieldName, m_GridHeader, m_ProgressForm);
            m_ProgressForm.Close();
            if (flg == false)
            {
                MapWinUtility.Logger.Msg("ERROR in shapefile to grid calculation");
            }

            //add grid to current map
            Microsoft.VisualBasic.MsgBoxResult res;
            res = MapWinUtility.Logger.Msg("Add grid to the map?", Microsoft.VisualBasic.MsgBoxStyle.YesNo, "Grid calculation finished");

            if (res == Microsoft.VisualBasic.MsgBoxResult.Yes)
            {
                DisplayGrid(m_GridFileName);
            }
        }
Exemple #2
0
        /// <summary>
        /// This starts the actual "shapefile to grid" calculation.
        /// Displays a Progress form showing calculation progress and
        /// status.
        /// </summary>
        public void DoShapefileToGrid2()
        {
            m_ProgressForm = new frmProgress();
            m_ProgressForm.Show();

            Rasterizer ras = new Rasterizer();
            bool flg = false;
            flg = ras.ShapefileToGrid2(m_ShpFileName, m_GridFileName, m_GridFileType, m_GridDataType,
                m_FieldName, m_GridHeader, m_ProgressForm);
            m_ProgressForm.Close();
            if (flg == false)
            {
                MapWinUtility.Logger.Msg("ERROR in shapefile to grid calculation");
            }

            //add grid to current map
            Microsoft.VisualBasic.MsgBoxResult res;
            res = MapWinUtility.Logger.Msg("Add grid to the map?", Microsoft.VisualBasic.MsgBoxStyle.YesNo,"Grid calculation finished");

            if (res == Microsoft.VisualBasic.MsgBoxResult.Yes)
            {
                DisplayGrid(m_GridFileName);
            }
        }