+ Reply to Thread
Results 1 to 4 of 4

Thread: RasterConversionOpClass ToRasterDataset into Memory

  1. #1
    Fabrizio Puddu
    Join Date
    Apr 2010
    Posts
    15
    Points
    0
    Answers Provided
    0


    0

    Default RasterConversionOpClass ToRasterDataset into Memory

    Hi,

    Is possible to use ToRasterDataset with workspace into memory ?


    Dim pTransformationOp As ITransformationOp = New ESRI.ArcGIS.GeoAnalyst.RasterTransformationOp
    Dim pWSF As IWorkspaceFactory = New InMemoryWorkspaceFactory
    Dim pWS As IWorkspace = Nothing
    Dim pWorkSpaceName As IWorkspaceName
    Dim pName As IName
    Dim pGeoDS As IGeoDataset = Nothing
    Dim rasterWorkspaceFactory As New RasterWorkspaceFactoryClass()
    Dim rasterWorkspace As IWorkspace = Nothing
    Dim rasterConversionOp As New RasterConversionOpClass()
    Dim pRasterEnv As IRasterAnalysisEnvironment = Nothing
    Dim pEnvelopeClip As IEnvelope = Nothing

    pEnvelopeClip = IncreseEnvelope(pPolygon.Envelope, iPercentageIncreseAreaClip)
    pRasterEnv = CType(pTransformationOp, IRasterAnalysisEnvironment)
    pRasterEnv.SetExtent(esriRasterEnvSettingEnum.esriRasterEnvValue, pEnvelopeClip)

    pTransformationOp = pRasterEnv
    pGeoDS = pTransformationOp.Clip(pRasterTerrainSurface, pEnvelopeClip)

    pWorkSpaceName = pWSF.Create("", cFileNameSurfaceAreaClip, Nothing, 0)
    pName = TryCast(pWorkSpaceName, IName)
    pWS = TryCast(pName.Open, IWorkspace)

    ClipLayerSurfaceOnAOI = rasterConversionOp.ToRasterDataset(pGeoDS, "TIFF", pWS, cFileNameSurfaceAreaClip)



    thanks at all

    fabrizio

  2. #2
    Duncan Hornby
    Join Date
    Apr 2010
    Posts
    931
    Points
    310
    Answers Provided
    52


    0

    Post Re: RasterConversionOpClass ToRasterDataset into Memory

    Fabrizio,

    You cannot create a raster in an InMemory workspace. If you look at the VBA Help file and search InMemoryWorkspaceFactory CoClass is states what it cannot support, rasters being one of them.

    Duncan

  3. #3
    Fabrizio Puddu
    Join Date
    Apr 2010
    Posts
    15
    Points
    0
    Answers Provided
    0


    0

    Default Re: RasterConversionOpClass ToRasterDataset into Memory

    Thanks Duncan, You are right, I forget this, I didn't re-consulted the documentation.

    thanks

    Fabrizio

  4. #4
    Miguel Souto
    Join Date
    Oct 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Re: RasterConversionOpClass ToRasterDataset into Memory

    Fabrizio,

    I have been in a similar problem, concerning the creation of a raster using only the memory, or in other words, not using the rasterdataset object, that needs a directory to be created.

    Maybe you already pass in the same problem? If yes, did you found a solution?

    Thanks in advance, and ideia would be perfect, since I'm really without solutions.

    Miguel

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts