This document is archived and information here might be outdated. Recommended version. |
Provides access to additional members that control an image server layer.
This interface is new at ArcGIS 9.3.
Name | Description | |
---|---|---|
GetImageMetadata | The image metadata xml. | |
GetMetaData | The image service metadata xml. | |
GetProperty | Gets the value of the given property. | |
IsDataSourceAIS | Indicates if the backend data source is AIS. | |
MosaicProperties | The image service mosaic properties xml. | |
ServiceInfo | The image service info xml. | |
ServiceProperties | The image service properties xml. | |
ViewpointProperties | The image service viewpoint properties xml. |
Classes | Description |
---|---|
ImageServerLayer | Image server layer source and display options. |
This example shows how to create an image server layer from a URL, clip a portion of image and save it to a file.
public static void AccessImageServerLayer()
{
//create an image server layer by passing an URL
IImageServerLayer2 imageserverlayer = new ImageServerLayerClass();
string URL = "http://myserver/arcgis/services/amazon/imageserver";
imageserverlayer.Initialize(URL);
//get raster from the image server layer
IRaster raster = imageserverlayer.Raster;
//raster from image server is normally large, you need to
//define the size of the raster
IRasterProps rasterProps = (IRasterProps)raster;
IEnvelope clipEnvelope = new EnvelopeClass();
clipEnvelope.PutCoords(779000, 9628000, 786000, 9634000);
rasterProps.Extent = clipEnvelope;
rasterProps.Width = 256;
rasterProps.Height = 256;
//save the clipped raster to File Geodatabase
ISaveAs saveas = (ISaveAs)raster;
IWorkspaceFactory workspaceFact = new FileGDBWorkspaceFactoryClass();
IWorkspace workspace = workspaceFact.OpenFromFile("c:\temp\fgdb.gdb",0);
saveas.SaveAs("clipfromimageserverlayer", workspace, "gdb");
}
This example shows how to create an image server layer from a URL, clip a portion of image and save it to a file.
Public Shared Sub AccessImageServerLayer()
'create an image server layer by passing an URL
Dim imageserverlayer As IImageServerLayer2 = New ImageServerLayerClass()
Dim URL As String = "http://myserver/arcgis/services/amazon/imageserver"
imageserverlayer.Initialize(URL)
'get raster from the image server layer
Dim raster As IRaster = imageserverlayer.Raster
'raster from image server is normally large, you need to
'define the size of the raster
Dim rasterProps As IRasterProps = CType(raster, IRasterProps)
Dim clipEnvelope As IEnvelope = New EnvelopeClass()
clipEnvelope.PutCoords(779000, 9628000, 786000, 9634000)
rasterProps.Extent = clipEnvelope
rasterProps.Width = 256
rasterProps.Height = 256
'save the clipped raster to File Geodatabase
Dim saveas As ISaveAs = CType(raster, ISaveAs)
Dim workspaceFact As IWorkspaceFactory = New FileGDBWorkspaceFactoryClass()
Dim workspace As IWorkspace = workspaceFact.OpenFromFile("c:" & Constants.vbTab & "emp" & Constants.vbFormFeed & "gdb.gdb",0)
saveas.SaveAs("clipfromimageserverlayer", workspace, "gdb")
End Sub