コード例 #1
0
        public string copyFeatures(object lyr, string outFeatureClass)
        {
            gp.OverwriteOutput = true;
            param.RemoveAll();
            param.Add(lyr);
            param.Add(outFeatureClass);
            IGeoProcessorResult rslt = gp.Execute("CopyFeatures_management", param, null);
            string x = getMessages(rslt);

            return(x);
        }
コード例 #2
0
        public bool deleteGeoDatabase(string dbPath)
        {
            bool x = true;

            try
            {
                IGeoProcessor gp = getGP();
                gp.OverwriteOutput = true;
                param.RemoveAll();
                param.Add(dbPath);
                IGeoProcessorResult rslt = gp.Execute("Delete_management", param, null);
                Console.WriteLine(getMessages(rslt));
            }
            catch (Exception e)
            {
                x = false;
                Console.WriteLine("Error: " + e.ToString());
            }
            return(x);
        }
コード例 #3
0
        public string createNewRasterDataset(string geoDatabase, string name, string cellSize, string pixelType, string coordSystem, string bands, string keywords, string pyramids, string tileSize, string compression, string pyramidRefPoint)
        {
            IGeoProcessor gp = getGP();

            gp.OverwriteOutput = true;
            param.RemoveAll();
            param.Add(geoDatabase);
            param.Add(name);
            param.Add(cellSize);
            param.Add(pixelType);
            param.Add(coordSystem);
            param.Add(bands);
            param.Add(keywords);
            param.Add(pyramids);
            param.Add(tileSize);
            param.Add(compression);
            param.Add(pyramidRefPoint);
            IGeoProcessorResult rslt = gp.Execute("createraster_management", param, null);
            string x = getMessages(rslt);

            return(x);
        }