0

I use sde database, registered with ArcGis Server 10.1. Sde connection is direct. Database container is postgres.

There is a raster dataset in this sde base. I can open this sde database

    private IWorkspace ArcSdeWorkspaceFromFile(String connectionFile)
    {
        Type factoryType = Type.GetTypeFromProgID(
            "esriDataSourcesGDB.SdeWorkspaceFactory");
        IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance
            (factoryType);
        return workspaceFactory.OpenFromFile(connectionFile, 0);
    }

and raster dataset. I can also add some data to this registered raster dataset.

    private void OpenRasterDataset()
    {
        IRasterWorkspaceEx temp = (IRasterWorkspaceEx)fgdbWorkspace;
        rasterDataset = temp.OpenRasterDataset(SdeParameters.rdName);
    } 

But I don't know how to delete (or clear - it is the best way) this raster dataset.

1

You should be able to query interface to IDatatset, then call the delete method.

((IDataset)rasterDataset).Delete();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.