Image Service#
Example#
from ipyleaflet import Map, ImageService, basemaps
im = ImageService(
url='https://landsat.arcgis.com/arcgis/rest/services/Landsat/PS/ImageServer',
rendering_rule={"rasterFunction":"Pansharpened Enhanced with DRA"},
format='jpgpng',
attribution='United States Geological Survey (USGS), National Aeronautics and Space Administration (NASA)'
)
m = Map(basemap=basemaps.Esri.WorldTopoMap, center=(47.655548, -122.303200), zoom=12)
m.add(im)
m
Usage#
By default, options like format, band_ids, time, rendering_rule are appended to the request URL when making the image service layer request.
Attributes#
- class ipyleaflet.leaflet.ImageService(**kwargs: Any)[source]#
ImageService class
Image Service layer for raster data served through a web service
- url#
URL to the image service
- Type:
string, default “”
- f#
response format (use
"image"to stream as bytes)- Type:
string, default “image”
- format#
format of exported image
"jpgpng""png""png8""png24""jpg""bmp""gif""tiff""png32""bip""bsq""lerc"
- Type:
string, default “jpgpng”
- pixel_type#
data type of the raster image
"C128""C64""F32""F64""S16""S32""S8""U1""U16""U2""U32""U4""U8""UNKNOWN"
- Type:
string, default “UNKNOWN”
- no_data#
pixel values representing no data
- Type:
List[int], default []
- no_data_interpretation#
how to interpret no data values
"esriNoDataMatchAny""esriNoDataMatchAll"
- Type:
string, default “”
- interpolation#
resampling process for interpolating the pixel values
"RSP_BilinearInterpolation""RSP_CubicConvolution""RSP_Majority""RSP_NearestNeighbor"
- Type:
string, default “”
- compression_quality#
lossy quality for image compression
- Type:
int, default 100
- band_ids#
order of bands to export for multiple band images
- Type:
List[int], default []
- time#
time range for image
- Type:
List[string], default []
- rendering_rule#
rules for rendering
- Type:
dict, default {}
- mosaic_rule#
rules for mosaicking
- Type:
dict, default {}
- endpoint#
endpoint format for building the export image URL
"Esri"
- Type:
string, default “Esri”
- attribution#
include image service attribution
- Type:
string, default “”
- crs#
projection used for this image service.
- Type:
dict, default ipyleaflet.projections.EPSG3857
- interactive#
emit when clicked for registered callback
- Type:
bool, default False
- update_interval#
minimum time interval to query for updates when panning (ms)
- Type:
int, default 200