[Geoserver-users] GeoServer CSS: Can I use attribute values in z_index?

Dear all,
I've tried using an attribute value in the z_index, like this:
z-index: [z_order];

but I get this error:
z-index must be integer literals, they cannot be expressions, multi-values
or any other type: Expression [expression=z_order]

(z_order is a smallint in the db)

Since I want to style a roads layer, it would be great to control overpass
levels without creating way too complex styles. Is there a way to do it?
Thanks very much for your help.
Ciao

Paolo

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-CSS-Can-I-use-attribute-values-in-z-index-tp5204533.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Thu, May 7, 2015 at 8:56 AM, Paolo Pasquali <paolo.pasquali@anonymised.com>
wrote:

Dear all,
I've tried using an attribute value in the z_index, like this:
z-index: [z_order];

but I get this error:
z-index must be integer literals, they cannot be expressions, multi-values
or any other type: Expression [expression=z_order]

(z_order is a smallint in the db)

Since I want to style a roads layer, it would be great to control overpass
levels without creating way too complex styles. Is there a way to do it?

Nope, it's not possible, it's like asking if you can put a feature in a
different SLD FeatureTypeStyle
based on an attribute (since that's how z-orders are translated to SLD
before
rendering).

Overall z control, cross layer, is probably not possible, it would require
us to keep all the
features, from all layers, in memory and sort them based on their z value
before rendering
them, which would likely make GeoServer much more likely to go out of
memory.
I mean, it's not unfeasible, but it would be destabilizing for a OGC server
whose load
is at the mercy of users using it (less so if the thing is only used for
backend tile seeding,
since the admin can control the load level).

It would be somewhat easier to allow feature paint order control over a
single layer instead,
as we could just issue a sort-by on that field before rendering... still,
it's a feature that
needs some sponsoring, or a good soul willing to work on it in spare time.

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 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

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

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

Thanks Andrea,
I meant controlling the paint order over a single layer nonetheless I had
not a clear idea how the z-index works. Thanks for the explanation.

Ciao

Paolo

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-CSS-Can-I-use-attribute-values-in-z-index-tp5204533p5204542.html
Sent from the GeoServer - User mailing list archive at Nabble.com.