Пример #1
0
        //Creates raster catalog using GP CreateRasterCatalog class
        static void CreateRasterCatalog_GP(object rasterCoordSys, object geometryCoordsys)
        {
            //Initialize GeoProcessor
            ESRI.ArcGIS.Geoprocessor.Geoprocessor geoProcessor = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();

            //CreateRasterCatalog GP tool
            CreateRasterCatalog createRasterCatalog = new CreateRasterCatalog();

            //Set parameters
            createRasterCatalog.out_path = sdePath;
            createRasterCatalog.out_name = catalogName;
            createRasterCatalog.raster_spatial_reference = rasterCoordSys;
            createRasterCatalog.spatial_reference        = geometryCoordsys;

            //Execute the tool to create a raster catalog
            geoProcessor.Execute(createRasterCatalog, null);
            ReturnMessages(geoProcessor);
        }
Пример #2
0
        public IRasterCatalog CreateRasterCat(string name, string sdePath)
        {
            ESRI.ArcGIS.Geoprocessor.Geoprocessor geoProcessor = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
            CreateRasterCatalog createRasterCatalog            = new CreateRasterCatalog();
            IGPCoordinateSystem rSR = new GPCoordinateSystemClass();
            IGPSpatialReference gSR = new GPSpatialReferenceClass();

            rSR.SpatialReference = new UnknownCoordinateSystemClass();
            gSR.SpatialReference = new UnknownCoordinateSystemClass();

            createRasterCatalog.out_path = sdePath;
            createRasterCatalog.out_name = name;
            createRasterCatalog.raster_spatial_reference = (object)rSR;
            createRasterCatalog.spatial_reference        = (object)gSR;
            geoProcessor.Execute(createRasterCatalog, null);
            IRasterCatalog rastercat = ((IRasterWorkspaceEx)this.m_workSpace).OpenRasterCatalog(name);

            return(rastercat);
        }
Пример #3
0
        static void CreateUnmanagedRasterCatalog()
        {
            try
            {
                //Use geoprocessing to create the geodatabase, the raster catalog, and load our directory
                //to the raster catalog.
                Geoprocessor geoprocessor = new Geoprocessor();

                //Create personal GDB in the TEMP directory
                CreatePersonalGDB createPersonalGDB = new CreatePersonalGDB();
                createPersonalGDB.out_folder_path = outputFolder;
                createPersonalGDB.out_name        = tempPGDB;

                geoprocessor.Execute(createPersonalGDB, null);

                //Create an unmanaged raster catalog in the newly created personal GDB
                CreateRasterCatalog createRasterCatalog = new CreateRasterCatalog();

                createRasterCatalog.out_path = tempPGDBPath;
                createRasterCatalog.out_name = tempRasterCatalog;
                createRasterCatalog.raster_management_type = "unmanaged";

                geoprocessor.Execute(createRasterCatalog, null);

                //Load data into the unmanaged raster catalog
                WorkspaceToRasterCatalog wsToRasterCatalog = new WorkspaceToRasterCatalog();

                wsToRasterCatalog.in_raster_catalog      = tempRasterCatalogPath;
                wsToRasterCatalog.in_workspace           = inputFolder;
                wsToRasterCatalog.include_subdirectories = "INCLUDE_SUBDIRECTORIES";

                geoprocessor.Execute(wsToRasterCatalog, null);
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.Message);
            }
        }
Пример #4
0
 public override void OnClick()
 {
     CreateRasterCatalog gpCreate = new CreateRasterCatalog();
 }
Пример #5
0
        public IRasterCatalog CreateRasterCat(string name, string sdePath)
        {
            ESRI.ArcGIS.Geoprocessor.Geoprocessor geoProcessor = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
            CreateRasterCatalog createRasterCatalog = new CreateRasterCatalog();
            IGPCoordinateSystem rSR = new GPCoordinateSystemClass();
            IGPSpatialReference gSR = new GPSpatialReferenceClass();
            rSR.SpatialReference = new UnknownCoordinateSystemClass();
            gSR.SpatialReference = new UnknownCoordinateSystemClass();

            createRasterCatalog.out_path = sdePath;
            createRasterCatalog.out_name = name;
            createRasterCatalog.raster_spatial_reference = (object)rSR;
            createRasterCatalog.spatial_reference = (object)gSR;
            geoProcessor.Execute(createRasterCatalog, null);
            IRasterCatalog rastercat = ((IRasterWorkspaceEx)this.m_workSpace).OpenRasterCatalog(name);
            return rastercat;
        }
        static void CreateUnmanagedRasterCatalog()
        {
            try
            {
                //Use geoprocessing to create the geodatabase, the raster catalog, and load our directory
                //to the raster catalog.
                Geoprocessor geoprocessor = new Geoprocessor();

                //Create personal GDB in the TEMP directory
                CreatePersonalGDB createPersonalGDB = new CreatePersonalGDB();
                createPersonalGDB.out_folder_path = outputFolder;
                createPersonalGDB.out_name = tempPGDB;

                geoprocessor.Execute(createPersonalGDB, null);

                //Create an unmanaged raster catalog in the newly created personal GDB
                CreateRasterCatalog createRasterCatalog = new CreateRasterCatalog();

                createRasterCatalog.out_path = tempPGDBPath;
                createRasterCatalog.out_name = tempRasterCatalog;
                createRasterCatalog.raster_management_type = "unmanaged";

                geoprocessor.Execute(createRasterCatalog, null);

                //Load data into the unmanaged raster catalog
                WorkspaceToRasterCatalog wsToRasterCatalog = new WorkspaceToRasterCatalog();

                wsToRasterCatalog.in_raster_catalog = tempRasterCatalogPath;
                wsToRasterCatalog.in_workspace = inputFolder;
                wsToRasterCatalog.include_subdirectories = "INCLUDE_SUBDIRECTORIES";

                geoprocessor.Execute(wsToRasterCatalog, null);
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.Message);
            }
        }
Пример #7
0
 public override void OnClick()
 {
     CreateRasterCatalog gpCreate = new CreateRasterCatalog();
 }
        //Creates raster catalog using GP CreateRasterCatalog class
        static void CreateRasterCatalog_GP(object rasterCoordSys, object geometryCoordsys)
        {
            //Initialize GeoProcessor
            ESRI.ArcGIS.Geoprocessor.Geoprocessor geoProcessor = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();

            //CreateRasterCatalog GP tool
            CreateRasterCatalog createRasterCatalog = new CreateRasterCatalog();

            //Set parameters
            createRasterCatalog.out_path = sdePath;
            createRasterCatalog.out_name = catalogName;
            createRasterCatalog.raster_spatial_reference = rasterCoordSys;
            createRasterCatalog.spatial_reference = geometryCoordsys;

            //Execute the tool to create a raster catalog
            geoProcessor.Execute(createRasterCatalog, null);
            ReturnMessages(geoProcessor);
        }