Example of blend operator usage: a single layer displaying a raster and a vector ImageProcess is added to the map
map = Map()
map
p = inter.ImageCollection("C03").process()
v = inter.VectorLayer("railroads")
v.set('all','line','stroke','#ffff00')
pv = v.process()
p = p.blend(pv,128)
map.clear()
map.addLayer(p.toLayer())
Blending Sentinel2 ImageCollection with Digital Elevation Model
from ipywidgets import Layout
map = Map(layout=Layout(height='700px'))
map.zoomToExtent(inter.search("Maussane"))
map
cityName="Maussane"
enlargeByDegree=0
countryCode="FR"
coll = inter.ImageCollection("S2")
coll = coll.filterOnDate(2016,6,1, 2016,12,31)
coll = coll.filterOn("cloudcover", "<=", 20)
coll = coll.filterOn("jrc_filepath", "<>", "")
coll = coll.filterOnGeoName(cityName, enlargeByDegree, countryCode)
coll.limit(4)
coll.sort("cloudcover",True)
p = coll.process().bands("B04","B03","B02",2.0)
p.opacity(255)
p.optimizeStats(True)
pDEM = inter.ImageCollection("DEM").process()
pDEM.parameter("mode","hillshade")
pDEM.parameter("azimuth","45.0")
pDEM.parameter("elevation","45.0")
pDEM.parameter("lighting","1.5")
pDEM.parameter("zfactor","1.0")
pDEM.range(0,325,1,255)
p.blend(pDEM,128)
map.clear()
tlayer1 = map.addLayer(p.toLayer())
Blending Core 003 ImageCollection with Digital Elevation Model and display with transparency over the OSM basemap
from ipywidgets import Layout
map = Map(layout=Layout(height='700px'))
map.zoomToExtent(inter.search("Visso,IT"))
map
pC03 = inter.ImageCollection("C03").process().opacity(180)
pDEM = inter.ImageCollection("DEM").process()
pDEM.parameter("mode","hillshade")
pDEM.parameter("azimuth","45.0")
pDEM.parameter("elevation","45.0")
pDEM.parameter("lighting","1.5")
pDEM.parameter("zfactor","1.0")
pDEM.range(0,325,1,255)
pC03.blend(pDEM,128)
map.clear()
tlayer1 = map.addLayer(pC03.toLayer())
Export a combination of three ImageProcesses blended together using transparency
p = inter.ImageCollection("C03").process()
v1 = inter.VectorLayer("railroads").opacity(255)
v1.remove('all')
v1.set('all','line','stroke','#ffff00')
v1.set('all','line','stroke-width','5.0')
pv1 = v1.process()
v2 = inter.VectorLayer("airports").opacity(255)
v2.set('all','point','fill','#ff0000')
v2.set('all','point','width','60')
v2.set('all','point','height','60')
pv2 = v2.process()
p = p.blend(pv1,128).blend(pv2,128)
lonmin = 5
lonmax = 14
latmin = 43
latmax = 48
zoom = 10
p.exportImage(lonmin,latmin,lonmax,latmax,zoom,"C03_Railroads_Airports.tif")