Coast overlays not working for nwcsaf cloudtype
Describe the bug When saving nwcsaf-pps images with coast overlays the products disapears and only the coastlines are shown.
To Reproduce
# Your code here
from satpy import Scene
from satpy.utils import debug_on
debug_on()
import glob
filenames = glob.glob("temp/NWCSAF/*.nc*")
scn1 = Scene(filenames=filenames)
scn1.load([ 'cloudtype'])
scn2 = scn1.resample("euron1")
scn2.show( 'cloudtype')
scn2.save_dataset('cloudtype', 'test_ct.png', overlay = {'coast_dir': '/gshhg-gmt-shp/','color': (255, 255, 0), 'width': 1.0, 'resolution': 'i'})
Expected behavior Expected png of cloud type product with coastlines.
Actual results
Empty png except for the coastlines:

Screenshots If applicable, add screenshots to help explain your problem.
Environment Info:
- OS: [e.g. OSX, Windows, Linux]
- Satpy Version: [e.g. 0.41 and main branch]
- PyResample Version:
- Readers and writers dependencies (when relevant): [run
from satpy.utils import check_satpy; check_satpy()]
Does the problem occur only for PPS or also for GEO?
So if you remove overlay from your save_dataset call, what do you get?
So if you remove
overlayfrom yoursave_datasetcall, what do you get?
The expected image for the composite
Is cloudtype an integer product before enhancement? I mean, after resample what is scn2['cloudtype'].dtype? And is it a single band or RGB? If RGB, what adds the colors? A composite or the enhancement?
Before #2301: colors were added by the composite
After #2301: integer product, colors are added by an enhancement
Ah ok, so the overlay logic doesn't handle palettized images.
It seam if I add fill_value=0 as kwarg to save_dataet the product is not removed.
Just hit this issue when working with some FCI L2 data. Adding fill_value=0 gave the expected output.
Is this a feature then?
Storing palletised images with overlays would be tricky. It would mean one needs to add an entry to the colourtable for every colour used.
Turning them into RGB or RGBA and then adding an overlay should work. I think overlays come after enhancements?
Yeah, I understand now.
So what happens is when adding overlays the image is not palletised any longer, but turn into, as you say, RGB og RGBA. But this is what I wanted here, so I'm good.
Anyway, by installing latest 0.54.0 satpy I get the image I want, RGBA with overlays.