Пример #1
0
        // gets the corresponding grid data type from shapefile field data type
        private MapWinGIS.GridDataType calcGridDataType(MapWinGIS.FieldType fieldType)
        {
            switch (fieldType)
            {
            case MapWinGIS.FieldType.DOUBLE_FIELD:
                return(MapWinGIS.GridDataType.DoubleDataType);

            case MapWinGIS.FieldType.INTEGER_FIELD:
                return(MapWinGIS.GridDataType.LongDataType);

            default:
                return(MapWinGIS.GridDataType.FloatDataType);
            }
        }
Пример #2
0
        /// <summary>
        /// Creates a new form object for setting properties of the
        /// new grid
        /// </summary>
        /// <param name="IMapWin">The MapWindow interface</param>
        /// <param name="shpFileName">File name of the shapefile</param>
        /// <param name="fieldType">Type of field containing data</param>
        public frmGrid(MapWindow.Interfaces.IMapWin IMapWin,
            string shpFileName, MapWinGIS.FieldType fieldType)
        {
            InitializeComponent();

            //setup event handler
            this.txtCellSize.TextChanged += new EventHandler(txtCellSize_TextChanged);

            //initialize the global variables and default values
            m_MapWin = IMapWin;
            m_ShpFileName = shpFileName;
            m_FieldType = fieldType;
            m_DefaultCellSize = calcDefaultCellsize();
            m_DefaultNodataValue = -9999F;
            m_GridHeader = new MapWinGIS.GridHeader();

            //populate the combo boxes
            populateGridList();
            populateExtentLayers();
            populateDataTypes();
            populateFileTypes();
        }
Пример #3
0
        /// <summary>
        /// Creates a new form object for setting properties of the
        /// new grid
        /// </summary>
        /// <param name="IMapWin">The MapWindow interface</param>
        /// <param name="shpFileName">File name of the shapefile</param>
        /// <param name="fieldType">Type of field containing data</param>
        public frmGrid(MapWindow.Interfaces.IMapWin IMapWin,
                       string shpFileName, MapWinGIS.FieldType fieldType)
        {
            InitializeComponent();

            //setup event handler
            this.txtCellSize.TextChanged += new EventHandler(txtCellSize_TextChanged);

            //initialize the global variables and default values
            m_MapWin             = IMapWin;
            m_ShpFileName        = shpFileName;
            m_FieldType          = fieldType;
            m_DefaultCellSize    = calcDefaultCellsize();
            m_DefaultNodataValue = -9999F;
            m_GridHeader         = new MapWinGIS.GridHeader();

            //populate the combo boxes
            populateGridList();
            populateExtentLayers();
            populateDataTypes();
            populateFileTypes();
        }