[Geoserver-users] Some CSS newbie questions

Good afternoon,

Sometimes SLDs can be quite tedious, so I started a PoC: converting 1 of our biggest SLDs (+4000 lines) using the CSS module. First results are very promising, but I have some questions in order to mimic the existing styling as close as possible. And if exactly the same styling would not be possible, to have an idea about the differences.

  1. What’s the equivalent of PropertyIsNull-tag?

  2. Does an equivalent of the ElseFilter-tag exist?

  3. Combined rules with metadata appear in the legend with the word “with” (e.g. “Parcels with Borders”). Is it possible to configure this behavior (e.g. “Parcels (Borders)”)?

  4. It seems the order in which the rules are rendered based on the css is random. Is that true? Or can I influence this order in some way? Otherwise the legend (based on the resulting SLD) is in randomly order.

  5. Can I import a css style into another one (cfr. the @import in regular css files)?

  6. In the documentation about well-known marks [1] this syntax is used to have a TrueType mark symbol(‘ttf://Times+New+Roman&char=0x19b2’);, but that doesn’t work for me. When I use symbol(‘ttf://Times+New+Roman#0x19b2’); instead (that’s what I used in the original SLD as well), it works like a charm. Could it be a flaw in the documentation?

[1] http://docs.geoserver.org/latest/en/user/extensions/css/values.html

Kind regards,

Roel De Nijs

@javaroe

Senior Java Developer


Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN

Disclaimer: zie www.aquafin.be P Denk aan het milieu. Druk deze mail niet onnodig af.

On Wed, Apr 23, 2014 at 6:16 PM, Roel De Nijs <roel.denijs@anonymised.com>wrote:

Good afternoon,

Sometimes SLDs can be quite tedious, so I started a PoC: converting 1 of
our biggest SLDs (+4000 lines) using the CSS module. First results are very
promising, but I have some questions in order to mimic the existing styling
as close as possible. And if exactly the same styling would not be
possible, to have an idea about the differences.

1. What’s the equivalent of PropertyIsNull-tag?

"myAttribute is null"

2. Does an equivalent of the ElseFilter-tag exist?

None

3. Combined rules with metadata appear in the legend with the word “with”
(e.g. “Parcels with Borders”). Is it possible to configure this behavior
(e.g. “Parcels (Borders)”)?

Nope

4. It seems the order in which the rules are rendered based on the css is
random. Is that true? Or can I influence this order in some way? Otherwise
the legend (based on the resulting SLD) is in randomly order.

I'm not sure sure.. probably no way to control the order

5. Can I import a css style into another one (cfr. the @import in regular
css files)?

No

6. In the documentation about well-known marks [1] this syntax is used to
have a TrueType mark symbol('ttf://Times+New+Roman&char=0x19b2');, but
that doesn’t work for me. When I use
symbol('ttf://Times+New+Roman#0x19b2'); instead (that’s what I used in the
original SLD as well), it works like a charm. Could it be a flaw in the
documentation?

I believe so, yes

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Not really the answers I was hoping for J Some of the answers would be acceptable, others would not be. So the CSS module is unfortunately not useful for us. Will have to stick to the SLDs for now.

Van: andrea.aime@…84… [mailto:andrea.aime@…84…] Namens Andrea Aime
Verzonden: woensdag 23 april 2014 18:26
Aan: Roel De Nijs
CC: geoserver-users@lists.sourceforge.net
Onderwerp: Re: [Geoserver-users] Some CSS newbie questions

On Wed, Apr 23, 2014 at 6:16 PM, Roel De Nijs <roel.denijs@…5173…> wrote:

Good afternoon,

Sometimes SLDs can be quite tedious, so I started a PoC: converting 1 of our biggest SLDs (+4000 lines) using the CSS module. First results are very promising, but I have some questions in order to mimic the existing styling as close as possible. And if exactly the same styling would not be possible, to have an idea about the differences.

  1. What’s the equivalent of PropertyIsNull-tag?

“myAttribute is null”

  1. Does an equivalent of the ElseFilter-tag exist?

None

  1. Combined rules with metadata appear in the legend with the word “with” (e.g. “Parcels with Borders”). Is it possible to configure this behavior (e.g. “Parcels (Borders)”)?

Nope

  1. It seems the order in which the rules are rendered based on the css is random. Is that true? Or can I influence this order in some way? Otherwise the legend (based on the resulting SLD) is in randomly order.

I’m not sure sure… probably no way to control the order

  1. Can I import a css style into another one (cfr. the @import in regular css files)?

No

  1. In the documentation about well-known marks [1] this syntax is used to have a TrueType mark symbol(‘ttf://Times+New+Roman&char=0x19b2’);, but that doesn’t work for me. When I use symbol(‘ttf://Times+New+Roman#0x19b2’); instead (that’s what I used in the original SLD as well), it works like a charm. Could it be a flaw in the documentation?

I believe so, yes

Cheers

Andrea

==

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK

for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN

Disclaimer: zie www.aquafin.be P Denk aan het milieu. Druk deze mail niet onnodig af.