Well, there are actually two kinds of functions in GeoServer CSS: css
functions like url() and symbol(), and CQL functions like [strConcat].
Implementation wise, there is no effort to combine the two (and the error
message you get indicates I didn't even do a very good job of reading
expressions that mix them :P).
You MAY be able to get it working by using the same syntax you would in SLD:
mark: url("wind/wind${strConcat(fixedspeed, northernhemisphere)}.svg");
If it doesn't work, please let me know (or if you have a Github account you
can file a bug on the GeoScript scala project yourself):
https://github.com/dwins/geoscript.scala/issues?direction=desc&labels=css&sort=created&state=open
--
David Winslow
OpenGeo - http://opengeo.org/
On Fri, May 11, 2012 at 10:26 AM, Chris Haste <[email protected]> wrote:
> Thank you to both of you.****
>
> ** **
>
> That does work fine.****
>
> ** **
>
> My last issue is around converting the following to CSS****
>
> <OnlineResource xlink:type="simple"
> xlink:href="wind/wind${strConcat(fixedspeed, northernhemisphere)}.svg" />*
> ***
>
> <Format>image/svg+xml</Format>****
>
> ** **
>
> Even when I try and break this down to something quite simple e.g.****
>
> mark: url(strconcat('wind/wind50','.svg'));****
>
> ** **
>
> in order to try and work out where things are going wrong it generates an
> exception; org.apache.wicket.WicketRuntimeException:
> javax.xml.transform.TransformerException: Translator error****
>
> ** **
>
> Any ideas on how to achieve this?****
>
> ** **
>
> *From:* David Winslow [mailto:[email protected]]
> *Sent:* 11 May 2012 2:36 PM
> *To:* Charles Galpin
> *Cc:* Chris Haste; [email protected]
> *Subject:* Re: [Geoserver-users] Another CSS question****
>
> ** **
>
> What Charles suggests should work just fine. I would also like to point
> out that [if_then_else] is just a filter function and works fine in CSS.**
> **
>
> ** **
>
> * {****
>
> mark-rotation: [****
>
> if_then_else(equalTo(fixedspeed, 0),****
>
> 0,****
>
> toDegrees(angle)****
>
> )****
>
> ]****
>
> }****
>
> ** **
>
> As long as you're good at counting parentheses it's not too bad :P****
>
> ** **
>
> --****
>
> David Winslow****
>
> OpenGeo - http://opengeo.org/****
>
> ** **
>
> On Fri, May 11, 2012 at 8:53 AM, Charles Galpin <[email protected]> wrote:*
> ***
>
> Hi Chris****
>
> ** **
>
> You take advantage of the cascading rules in CSS so you would default it
> to zero, then add a rule to rotate. I believe something like this will work
> ****
>
> ** **
>
> * {****
>
> mark-rotation: 0****
>
> ...****
>
> }****
>
> ** **
>
> [fixedspeed != 0] {****
>
> mark-rotation: [toDegrees(angle)];****
>
> }****
>
> ** **
>
> hth****
>
> charles****
>
> ** **
>
> On May 11, 2012, at 8:23 AM, Chris Haste wrote:****
>
> ** **
>
> Hello all / David,****
>
> ****
>
> I have yet another CSS question…****
>
> ****
>
> Assuming it is possible, how would you represent the following SLD as CSS?
> ****
>
> ****
>
> <Rotation>
> <ogc:Function name="if_then_else">
> <ogc:Function name="equalTo">
> <ogc:PropertyName>fixedspeed</ogc:PropertyName>
> <ogc:Literal>0</ogc:Literal>
> </ogc:Function>
> <ogc:Literal>0</ogc:Literal>
> <ogc:Function name="toDegrees">
> <ogc:PropertyName>angle</ogc:PropertyName>
> </ogc:Function>
> </ogc:Function>
> </Rotation>****
>
> ****
>
> Thanks****
>
> ****
>
> Chris****
>
> *** This communication has been sent from World Fuel Services
> Corporation or its subsidiaries or its affiliates for the intended
> recipient
> only and may contain proprietary, confidential or privileged information.
> If you are not the intended recipient, any review, disclosure, copying,
> use, or distribution of the information included in this communication
> and any attachments is strictly prohibited. If you have received this
> communication in error, please notify us immediately by replying to this
> communication and delete the communication, including any
> attachments, from your computer. Electronic communications sent to or
> from World Fuel Services Corporation or its subsidiaries or its affiliates
> may be monitored for quality assurance and compliance purposes.*******
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users****
>
> ** **
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users****
>
> ** **
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users