On Wed, Feb 21, 2024 at 7:37 PM Jody Garnett <jody.garn...@gmail.com> wrote:

> That sounds good .. and surprising it is not there already? Is it just not
> a feature of SLD?
>

Indeed, as crazy as it sounds, it's not an SLD feature. This is an excerpt
from SE 1.1 schemas:

<xsd:complexType name="ChannelSelectionType">
<xsd:choice>
<xsd:sequence>
<xsd:element ref="se:RedChannel"/>
<xsd:element ref="se:GreenChannel"/>
<xsd:element ref="se:BlueChannel"/>
</xsd:sequence>
<xsd:element ref="se:GrayChannel"/>
</xsd:choice>
</xsd:complexType>


> Default method very much appreciated to be kind to implementations. For a
> default setter should it log a message, or throw a not implemented
> exception?
>

Yes. There is only one implementation, that will be updated, so the
exception should not be triggered in the practice.


> If you are making an API change perhaps attack the channel traversal
> problem directly with a default method to list all 4 channels...
>

The existing API is actually going to collaborate for this bit, here is
what we have in the style visitor:

/**
     * Called when accept is called on a raster {@link ChannelSelection}
element
     *
     * @param cs the {@link ChannelSelection} to visit.
     */
    void visit(ChannelSelection cs);

    /**
     * Called when accept is called on a raster {@link SelectedChannelType}
element
     *
     * @param sct the {@link SelectedChannelType} to visit.
     */
    void visit(SelectedChannelType sct);

So it's up to the implementation to unpack the channel selection and call
the visit on the single channel selection type.
All existing implementations will be updated to call also on the new alpha
channel. No need for a new visit method here.

All in all, existing implementations not using the alpha channel should be
unaffected, which should help backporting this change.
Thoughts?

Cheers
Andrea

==

GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to