Accessing ECWP service


Summary Enhanced Compressed Wavelet Protocol (ECWP) accesses and delivers imagery from ERDAS ER Mapper Image Web Server. ArcGIS supports ECWP and can read services from ERDAS ER Mapper Image Web Server directly as a raster dataset.

About accessing ECWP as a raster format

ArcGIS can read ECWP as a raster format. A raster dataset can be created by passing the uniform resource locator (URL) to the OpenRasterDataset method. See the following code example:
[C#]
string ECWP_URL = 
    "ecwp://imagery.oregonexplorer.info/ecwimages/2005orthoimagery.ecw";
IWorkspaceFactory wsFactory = new RasterWorkspaceFactoryClass();
IRasterWorkspace ws = (IRasterWorkspace)wsFactory.OpenFromFile(@"c:\temp", 0);
IRasterDataset rasterDS = ws.OpenRasterDataset(ECWP_URL);
[VB.NET]
Dim ECWP_URL As String = "ecwp://imagery.oregonexplorer.info/ecwimages/2005orthoimagery.ecw"
Dim wsFactory As IWorkspaceFactory = New RasterWorkspaceFactoryClass()
Dim ws As IRasterWorkspace = CType(wsFactory.OpenFromFile("c:\temp", 0), IRasterWorkspace)
Dim rasterDS As IRasterDataset = ws.OpenRasterDataset(ECWP_URL)
The raster dataset can then be displayed using a RasterLayer class. See the following code example:
[C#]
IRasterLayer rasterLy = new RasterLayerClass();
rasterLy.CreateFromDataset(rasterDS);
[VB.NET]
Dim rasterLy As IRasterLayer = New RasterLayerClass()
rasterLy.CreateFromDataset(rasterDS)






To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing Deployment licensing
ArcInfo ArcInfo
ArcEditor ArcEditor
ArcView ArcView
Engine Developer Kit Engine Runtime