Publishing RGB rasters
This simple AIKP is used for publishing multi-band (RGBA) rasters in TIFF/TIF file format.
One thing to keep in mind that Band 4 should be set to ɑlpha (or transparency) values.
Prerequisites
rsync Region of Interest (ROI - as GeoJSON or KML) to home folder
rsync raster for publishing to home folder
Constraints
RGBA = RGB as first 3 bands and alpha band as fourth
preferably in EPSG:4326 or EPSG code that GDAL can read
CLI workflow
create -n project_name -a
roi add -n roi_name <path to ROI in home folder>
task create -t ocli.aikp.composite -r roi_name -n task_name -a
optional but recommended
task set friendly_name="tree/structure/in/webUI/" task set attribution="user chosen text that would appear in bottom right of screen in webUI"
task set custom_composite_path=<path to TIFF in home folder>
task make recipe
task template link
ai makecog full
additional options that can be added
--nodata 0= set no data value of created COG
--mask-band INTEGER= force which band is used as alpha (RGBA from 1 to 4, with -1 being same as 4)
--overview-resample ...= choice of resampling algorithms, options: nearest, average (DEFAULT), bilinear, cubic, cubicspline, lanczos
ai makegeojson --friendly-name="+final addition to friendly name set above"
additional options that can be added
--cos-key="+_addition"= useful in case same task is reused for publishing multiple rasters, so each one will have different key in COS
ai upload
ai publish post