Example #1
0
        private void getZoneSummaryPath()
        {
            string outPath = null;
            string outName = "";

            ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
            gxDialog.AllowMultiSelect = true;
            ESRI.ArcGIS.Catalog.IGxObjectFilter flt = null;
            flt = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();
            gxDialog.ObjectFilter = flt;
            gxDialog.Title        = "Select a Table";
            ESRI.ArcGIS.Catalog.IEnumGxObject eGxObj;
            if (gxDialog.DoModalOpen(0, out eGxObj))
            {
                ESRI.ArcGIS.Catalog.IGxObject gxObj = eGxObj.Next();
                while (gxObj != null)
                {
                    outPath = gxObj.FullName;
                    outName = gxObj.BaseName;
                    ITable rs = geoUtil.getTable(outPath);
                    if (!rstDic.ContainsKey(outName))
                    {
                        rstDic.Add(outName, rs);
                    }
                    else
                    {
                        rstDic[outName] = rs;
                    }
                    gxObj = eGxObj.Next();
                }
                txtOutputPath.Text = outName;
            }
            return;
        }
Example #2
0
 private void getTablePath()
 {
     ESRI.ArcGIS.CatalogUI.IGxDialog     gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt      = null;
     flt = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();
     gxDialog.ObjectFilter = flt;
     gxDialog.Title        = "Save Output Table";
     if (gxDialog.DoModalSave(0))
     {
         txtOutNm.Text = gxDialog.FinalLocation.FullName + "\\" + gxDialog.Name;
     }
     return;
 }
Example #3
0
 private void getTablePath()
 {
     ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
     gxDialog.AllowMultiSelect = false;
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt = null;
     flt = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();//.GxFilterRasterDatasetsClass();
     gxDialog.ObjectFilter = flt;
     gxDialog.Title        = "Save Output Table";
     if (gxDialog.DoModalSave(0))
     {
         txtTableName.Text = gxDialog.FinalLocation.FullName + "\\" + gxDialog.Name;
     }
     return;
 }
 private void getZoneSummaryPath()
 {
     string outPath = null;
     string outName = "";
     ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
     gxDialog.AllowMultiSelect = true;
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt = null;
     flt = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();
     gxDialog.ObjectFilter = flt;
     gxDialog.Title = "Select a Table";
     ESRI.ArcGIS.Catalog.IEnumGxObject eGxObj;
     if (gxDialog.DoModalOpen(0, out eGxObj))
     {
         ESRI.ArcGIS.Catalog.IGxObject gxObj = eGxObj.Next();
         while (gxObj != null)
         {
             outPath = gxObj.FullName;
             outName = gxObj.BaseName;
             ITable rs = geoUtil.getTable(outPath);
             if (!rstDic.ContainsKey(outName))
             {
                 rstDic.Add(outName, rs);
             }
             else
             {
                 rstDic[outName] = rs;
             }
             gxObj = eGxObj.Next();
         }
         txtOutputPath.Text = outName;
     }
     return;
 }
 private void getLayer()
 {
     string outPath = null;
     string outName = "";
     ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
     ESRI.ArcGIS.Catalog.IGxObjectFilterCollection fltColl = (ESRI.ArcGIS.Catalog.IGxObjectFilterCollection)gxDialog;
     gxDialog.AllowMultiSelect = true;
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt = new ESRI.ArcGIS.Catalog.GxFilterRasterDatasetsClass();
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt2 = new ESRI.ArcGIS.Catalog.GxFilterPolygonFeatureClassesClass();
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt3 = new ESRI.ArcGIS.Catalog.GxFilterPointFeatureClassesClass();
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt4 = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();
     fltColl.AddFilter(flt, true);
     fltColl.AddFilter(flt2, false);
     fltColl.AddFilter(flt3, false);
     fltColl.AddFilter(flt4, false);
     gxDialog.Title = "Select a Raster, Polygon, Point, or Table";
     ESRI.ArcGIS.Catalog.IEnumGxObject eGxObj;
     if (gxDialog.DoModalOpen(0, out eGxObj))
     {
         ESRI.ArcGIS.Catalog.IGxObject gxObj = eGxObj.Next();
         while (gxObj != null)
         {
             outPath = gxObj.FullName;
             outName = gxObj.BaseName;
             if (gxDialog.ObjectFilter is ESRI.ArcGIS.Catalog.GxFilterRasterDatasetsClass)
             {
                 IFunctionRasterDataset rs = rsUtil.createIdentityRaster(outPath);
                 if (!rstDic.ContainsKey(outName))
                 {
                     rstDic.Add(outName, rs);
                 }
                 else
                 {
                     rstDic[outName] = rs;
                 }
             }
             else if (gxDialog.ObjectFilter is ESRI.ArcGIS.Catalog.GxFilterTablesClass)
             {
                 ITable tbl = geoUtil.getTable(outPath);
                 if (!tblDic.ContainsKey(outName))
                 {
                     tblDic.Add(outName, tbl);
                 }
                 else
                 {
                     tblDic[outName] = tbl;
                 }
             }
             else
             {
                 IFeatureClass ftrCls = geoUtil.getFeatureClass(outPath);
                 if (!ftrDic.ContainsKey(outName))
                 {
                     ftrDic.Add(outName, ftrCls);
                 }
                 else
                 {
                     ftrDic[outName] = ftrCls;
                 }
             }
             if (!lyrDic.ContainsKey(outName))
             {
                 lyrDic.Add(outName, outPath);
                 lsbLayers.Items.Add(outName);
             }
             else
             {
                 lyrDic[outName] = outPath;
             }
             gxObj = eGxObj.Next();
         }
     }
     return;
 }
 private void getTablePath()
 {
     ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
     gxDialog.AllowMultiSelect = false;
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt = null;
     flt = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();//.GxFilterRasterDatasetsClass();
     gxDialog.ObjectFilter = flt;
     gxDialog.Title = "Save Output Table";
     if (gxDialog.DoModalSave(0))
     {
         txtTableName.Text = gxDialog.FinalLocation.FullName + "\\" + gxDialog.Name;
     }
     return;
 }
 private void getTablePath()
 {
     ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt = null;
     flt = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();
     gxDialog.ObjectFilter = flt;
     gxDialog.Title = "Save Output Table";
     if (gxDialog.DoModalSave(0))
     {
         txtOutNm.Text = gxDialog.FinalLocation.FullName + "\\" + gxDialog.Name;
     }
     return;
 }
Example #8
0
        private void getLayer()
        {
            string outPath = null;
            string outName = "";

            ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
            ESRI.ArcGIS.Catalog.IGxObjectFilterCollection fltColl = (ESRI.ArcGIS.Catalog.IGxObjectFilterCollection)gxDialog;
            gxDialog.AllowMultiSelect = true;
            ESRI.ArcGIS.Catalog.IGxObjectFilter flt  = new ESRI.ArcGIS.Catalog.GxFilterRasterDatasetsClass();
            ESRI.ArcGIS.Catalog.IGxObjectFilter flt2 = new ESRI.ArcGIS.Catalog.GxFilterPolygonFeatureClassesClass();
            ESRI.ArcGIS.Catalog.IGxObjectFilter flt3 = new ESRI.ArcGIS.Catalog.GxFilterPointFeatureClassesClass();
            ESRI.ArcGIS.Catalog.IGxObjectFilter flt4 = new ESRI.ArcGIS.Catalog.GxFilterTablesClass();
            fltColl.AddFilter(flt, true);
            fltColl.AddFilter(flt2, false);
            fltColl.AddFilter(flt3, false);
            fltColl.AddFilter(flt4, false);
            gxDialog.Title = "Select a Raster, Polygon, Point, or Table";
            ESRI.ArcGIS.Catalog.IEnumGxObject eGxObj;
            if (gxDialog.DoModalOpen(0, out eGxObj))
            {
                ESRI.ArcGIS.Catalog.IGxObject gxObj = eGxObj.Next();
                while (gxObj != null)
                {
                    outPath = gxObj.FullName;
                    outName = gxObj.BaseName;
                    if (gxDialog.ObjectFilter is ESRI.ArcGIS.Catalog.GxFilterRasterDatasetsClass)
                    {
                        IFunctionRasterDataset rs = rsUtil.createIdentityRaster(outPath);
                        if (!rstDic.ContainsKey(outName))
                        {
                            rstDic.Add(outName, rs);
                        }
                        else
                        {
                            rstDic[outName] = rs;
                        }
                    }
                    else if (gxDialog.ObjectFilter is ESRI.ArcGIS.Catalog.GxFilterTablesClass)
                    {
                        ITable tbl = geoUtil.getTable(outPath);
                        if (!tblDic.ContainsKey(outName))
                        {
                            tblDic.Add(outName, tbl);
                        }
                        else
                        {
                            tblDic[outName] = tbl;
                        }
                    }
                    else
                    {
                        IFeatureClass ftrCls = geoUtil.getFeatureClass(outPath);
                        if (!ftrDic.ContainsKey(outName))
                        {
                            ftrDic.Add(outName, ftrCls);
                        }
                        else
                        {
                            ftrDic[outName] = ftrCls;
                        }
                    }
                    if (!lyrDic.ContainsKey(outName))
                    {
                        lyrDic.Add(outName, outPath);
                        lsbLayers.Items.Add(outName);
                    }
                    else
                    {
                        lyrDic[outName] = outPath;
                    }
                    gxObj = eGxObj.Next();
                }
            }
            return;
        }