On Wed, Dec 5, 2018 at 2:43 AM Jody Garnett <[email protected]> wrote:
> Looks like we should just make a JSON representation of SLD and call if a > day :) > That would be a GetStyles call not a GetLegendGraphic one though ;-) > +1 > Thanks, added > > Thinking through the CQL, ... > > The CQL requiring square brackets is strictly to avoid overlap with string > literal. > Yes > One thing I do not see for CQL is a fallback value? > > It may be useful in cases where the polygon fill for example is a CQL > expression since a legend does not have as sample feature to work from, > would allow a client without the ability to parse CQL to display display > something. > There is no such a thing as a fallback in the normal GetLegendGraphic either, when GeoServer generates it, it just builds a fake feature with default values for each type from DataUtilities, and pray that it does not blow up. Often it does, other times the result does not make sense. The client can setup defaults of their own if they want, but the "smart" and honest thing IMHO is admitting that you don't know what the color or stroke width will be, and eventually give the user a way to see the law governing it (e.g., by showing the CQL in a popup). Alternatively it may be smart to list colours to display (for example > representing a recode or interpolate function?) > A client can be setup for minimum parsing of CQL, even just regex based, to extract that information, but if you cannot correlate that with a quantity, the colors that you are going to list are meaningless. Best to have a readable title in that case, and if the user really wants to know, they can look at the CQL attached to that rule. Cheers Andrea GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it 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.*
_______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
