com.esri.map
Class ArcGISImageServiceLayer

java.lang.Object
  extended by com.esri.map.Layer
      extended by com.esri.map.DynamicLayer
          extended by com.esri.map.ArcGISImageServiceLayer
All Implemented Interfaces:
TimeAwareLayer

public class ArcGISImageServiceLayer
extends DynamicLayer
implements TimeAwareLayer

A layer that provides provides access to raster data. Allows you to work with an Image Service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). Image Service is optimized for delivering raw or finished imagery that can be RGB, panchromatic, multispectral, or elevation data stored in a geodatabase or file system.
More information can be found at http://resources.arcgis.com/en/help/rest/apiref/imageserver.html

Since:
10.1.1

Nested Class Summary
 
Nested classes/interfaces inherited from class com.esri.map.Layer
Layer.LayerStatus
 
Field Summary
 
Fields inherited from class com.esri.map.DynamicLayer
_nativeCreateSpatialRef
 
Fields inherited from class com.esri.map.Layer
_credentials, _progress, _resolutionList, serviceInfo
 
Constructor Summary
ArcGISImageServiceLayer()
          Default constructor.
ArcGISImageServiceLayer(String url)
          Constructs the image map service layer with a URL to the service end point.
ArcGISImageServiceLayer(String url, ImageServiceParameters options)
          Constructs a layer from a URL with provided options.
ArcGISImageServiceLayer(String url, UserCredentials credentials)
          Constructs a layer from a URL and credentials for the secure service.
ArcGISImageServiceLayer(String url, UserCredentials credentials, ImageServiceParameters options)
           
 
Method Summary
 int getBandCount()
          Gets the number of bands in the ArcGISImageServiceLayer.
 int[] getBandIds()
          Gets ImageService Band IDs.
 int getCompressionQuality()
          Gets the compression quality of the exported image.
 ImageServiceParameters.IMAGE_FORMAT getImageFormat()
          Gets the image format.
 ImageServiceParameters.RSP getInterpolation()
          Gets the interpolation method.
 LayerLegendInfoCollection getLegend()
           
 double[] getMaxValues()
          Returns the maximum pixel values of all bands.
 double[] getMeanValues()
          Returns the mean pixel values of all bands.
 double[] getMinValues()
          Returns the minimum pixel values of all bands.
 MosaicRule getMosaicRule()
          Gets the mosaic rule of the layer.
 ImageServiceParameters getOptions()
          Gets the options of the ArcGISImageServiceLayer.
 double getPixelSizeX()
          Gets the size of pixel in X direction.
 double getPixelSizeY()
          Gets the size of pixel in Y direction.
 ImageServiceParameters.PIXEL_TYPE getPixelType()
          Gets the pixel type of the image service.
 RasterFunction getRenderingRule()
          Gets the rendering rule of the layer.
 double[] getStdvValues()
          Returns the standard deviation pixel values of all bands.
 TimeExtent getTimeExtent()
          Gets the valid TimeExtent object for the Layer or null if this service does not support time based queries.
 TimeInfo getTimeInfo()
          Get all the time awareness information for this layer.
 TimeExtent getTimeInterval()
          Get the current date/time range that this layer is filtered by.
protected  void init(boolean isVisible, int[] visibleLayers, String title, float opacity)
          This method is called only when composing a Map from a Web Map.
protected  void internalInit()
           
 boolean isTimeAware()
          Indicates whether or not this image service layer belongs to a service which is time aware.
 void setBandIds(int[] bandIds)
          If there are multiple bands, you can specify a single band to export, or you can change the band combination (red, green, blue) by specifying the band number.
 void setCompressionQuality(int compressionQuality)
          Sets the compression quality of the exported image.
 void setImageFormat(ImageServiceParameters.IMAGE_FORMAT format)
          Sets the image format.
 void setInterpolation(ImageServiceParameters.RSP interpolation)
          Sets the interpolation method.
 void setMosaicRule(MosaicRule mosaicRule)
          Sets the mosaic rule of the layer to the specified value.
 void setRenderingRule(RasterFunction renderingRule)
          Sets the rendering rule of the layer to the given value.
 void setTimeInterval(TimeExtent timeInterval)
          Set the current date/time range that this layer will be filtered by.
 
Methods inherited from class com.esri.map.DynamicLayer
createNativeLayer, getCenterMeridian, getDefaultSpatialReference, getResolution, initializeNativeLayer, isCrossesDateline, refresh, requestImage, setUrl, startlisteningToMapEvents, stopListeningToMapEvents
 
Methods inherited from class com.esri.map.Layer
addLayerInitializeCompleteListener, finalize, fireLayerCreateCompleteEvent, fireLayerCreateErrorEvent, fireLayerCreateErrorEvent, getCopyrightText, getCredentialsInternal, getDescription, getException, getExtent, getFullExtent, getInitialExtent, getInitializationError, getLayerHandle, getMap, getMapServer, getMapServerInfo, getMapServerLegendInfo, getMaxScale, getMinScale, getName, getOpacity, getPopupInfo, getResolutionList, getServiceDescription, getSpatialReference, getStatus, getUrl, getUrlHashCode, initializeAsync, internalGetLayerLegendInfos, isHidingNoDataTiles, isInitialized, isReady, isShowingCopyright, isVisible, loadServiceInfo, lock, recycle, reinitializeAsync, removeLayerInitializeCompleteListener, setCopyrightText, setCredentials, setDefaultSpatialReference, setDescription, setError, setException, setFullExtent, setInitialExtent, setLayerHandle, setMap, setMapServer, setName, setOpacity, setPopupInfos, setServiceDescription, setShowingCopyright, setStatus, setVisible, unlock, updateSpatialReferenceStatus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcGISImageServiceLayer

public ArcGISImageServiceLayer()
Default constructor.


ArcGISImageServiceLayer

public ArcGISImageServiceLayer(String url,
                               UserCredentials credentials,
                               ImageServiceParameters options)

ArcGISImageServiceLayer

public ArcGISImageServiceLayer(String url)
Constructs the image map service layer with a URL to the service end point.

Parameters:
url - the URL to the service.

ArcGISImageServiceLayer

public ArcGISImageServiceLayer(String url,
                               UserCredentials credentials)
Constructs a layer from a URL and credentials for the secure service.

Parameters:
url - the URL
credentials - the credentials

ArcGISImageServiceLayer

public ArcGISImageServiceLayer(String url,
                               ImageServiceParameters options)
Constructs a layer from a URL with provided options.

Parameters:
url - the URL
options - image service options
credentials - the credentials
Method Detail

getPixelSizeX

public double getPixelSizeX()
Gets the size of pixel in X direction. The size is defined in the associated service. You should not invoke the method unless the layer is initialized.

Returns:
Returns the pixelSizeX.

getPixelSizeY

public double getPixelSizeY()
Gets the size of pixel in Y direction. The size is defined in the associated service. You should not invoke the method unless the layer is initialized.

Returns:
Returns the pixelSizeY.

getPixelType

public ImageServiceParameters.PIXEL_TYPE getPixelType()
Gets the pixel type of the image service. Pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point. Integers are whole numbers, whereas floating points have decimals. The type is defined in the associated service. You should not invoke the method unless the layer is initialized.

Returns:
Returns the pixelType.

getMinValues

public double[] getMinValues()
Returns the minimum pixel values of all bands.

Returns:
the minimum pixel values of all bands.

getMaxValues

public double[] getMaxValues()
Returns the maximum pixel values of all bands.

Returns:
the maximum pixel values of all bands.

getMeanValues

public double[] getMeanValues()
Returns the mean pixel values of all bands.

Returns:
the mean pixel values of all bands.

getStdvValues

public double[] getStdvValues()
Returns the standard deviation pixel values of all bands.

Returns:
the standard deviation pixel values of all bands.

getBandCount

public int getBandCount()
Gets the number of bands in the ArcGISImageServiceLayer. The BandCount is defined in the associated service. You should not invoke the method unless the layer is initialized.

Returns:
Returns the bandCount.

getOptions

public ImageServiceParameters getOptions()
Gets the options of the ArcGISImageServiceLayer.

Returns:
Returns the options.
See Also:
ArcGISImageServiceLayer(String, ImageServiceParameters)

setBandIds

public void setBandIds(int[] bandIds)
If there are multiple bands, you can specify a single band to export, or you can change the band combination (red, green, blue) by specifying the band number. Band number is 0 based. Example: bandIds={2,1,0}

Parameters:
bandIds - the new band ids.

getBandIds

public int[] getBandIds()
Gets ImageService Band IDs. BandIds are zero based.

Returns:
the band ids

setCompressionQuality

public void setCompressionQuality(int compressionQuality)
Sets the compression quality of the exported image. Only valid with JPG image format.You need to call

Parameters:
compressionQuality - A value from 0 to 100. 100 is best quality but largest in file size. DynamicLayer.refresh() to reflect changes of the compression quality.

getCompressionQuality

public int getCompressionQuality()
Gets the compression quality of the exported image. Only valid with JPG image format.

Returns:
A value from 0 to 100. 100 is best quality but largest in file size.

setImageFormat

public void setImageFormat(ImageServiceParameters.IMAGE_FORMAT format)
Sets the image format. You need to call DynamicLayer.refresh() to reflect changes of the format.

Parameters:
format - the new image format.

getImageFormat

public ImageServiceParameters.IMAGE_FORMAT getImageFormat()
Gets the image format.

Returns:
the image format.

setInterpolation

public void setInterpolation(ImageServiceParameters.RSP interpolation)
Sets the interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space. You need to call DynamicLayer.refresh() to reflect changes of the interpolation value.

Parameters:
interpolation - the new interpolation value.

getInterpolation

public ImageServiceParameters.RSP getInterpolation()
Gets the interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space.

Returns:
the interpolation value.

setMosaicRule

public void setMosaicRule(MosaicRule mosaicRule)
Sets the mosaic rule of the layer to the specified value. The mosaic rule defines how individual images should be mosaicked. You need to call DynamicLayer.refresh() to reflect changes of the MosaicRule.

Parameters:
mosaicRule - the mosaic rule.

getMosaicRule

public MosaicRule getMosaicRule()
Gets the mosaic rule of the layer. The mosaic rule defines how individual images should be mosaicked.

Returns:
the current MosaicRule.

setRenderingRule

public void setRenderingRule(RasterFunction renderingRule)
Sets the rendering rule of the layer to the given value. You need to call DynamicLayer.refresh() to reflect changes of the rendering rule.

Parameters:
renderingRule - the new rendering rule.

getRenderingRule

public RasterFunction getRenderingRule()
Gets the rendering rule of the layer.

Returns:
the new rendering rule.

internalInit

protected void internalInit()
Specified by:
internalInit in class Layer

getLegend

public LayerLegendInfoCollection getLegend()
Specified by:
getLegend in class Layer

init

protected void init(boolean isVisible,
                    int[] visibleLayers,
                    String title,
                    float opacity)
Description copied from class: Layer
This method is called only when composing a Map from a Web Map. The web map contains properties that every layer should be initialized with, up front.

Specified by:
init in class Layer

isTimeAware

public boolean isTimeAware()
Indicates whether or not this image service layer belongs to a service which is time aware.

Specified by:
isTimeAware in interface TimeAwareLayer
Returns:
true if time functionality is supported

getTimeExtent

public TimeExtent getTimeExtent()
Description copied from interface: TimeAwareLayer
Gets the valid TimeExtent object for the Layer or null if this service does not support time based queries.

Specified by:
getTimeExtent in interface TimeAwareLayer
Returns:
the valid range of dates for this layer.

getTimeInterval

public TimeExtent getTimeInterval()
Description copied from interface: TimeAwareLayer
Get the current date/time range that this layer is filtered by.

Specified by:
getTimeInterval in interface TimeAwareLayer
Returns:
the current date/time range

setTimeInterval

public void setTimeInterval(TimeExtent timeInterval)
Description copied from interface: TimeAwareLayer
Set the current date/time range that this layer will be filtered by.

Specified by:
setTimeInterval in interface TimeAwareLayer
Parameters:
timeInterval - the new date/time range

getTimeInfo

public TimeInfo getTimeInfo()
Description copied from interface: TimeAwareLayer
Get all the time awareness information for this layer.

Specified by:
getTimeInfo in interface TimeAwareLayer
Returns:


Copyright © 2012. All Rights Reserved.