uki
February 14, 2014, 10:37am
1
Hi all,
I'm using CSS styling, which works great, but I have an issue with unit of
measure for a value that is calculated with an expression. According to this
post: http://geo-solutions.blogspot.it/2014/01/css-uom.html the uom
annotations are now supported in SLD, so they are not converted by CSS
module. So how to use uom with an expression? My old SLD was:
<PointSymbolizer
uom="http://www.opengeospatial.org/se/units/metre"> ;
<Graphic>
...
<Size>
<ogc:Mul>
<ogc:PropertyName>length</ogc:PropertyName>
<ogc:Literal>6</ogc:Literal>
</ogc:Mul>
</Size>
</Graphic>
</PointSymbolizer>
How can I achieve this with CSS?
Thanks!
Lukasz
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/CSS-style-unit-of-measure-expression-tp5103806.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
On Fri, Feb 14, 2014 at 11:37 AM, uki <ukiz@anonymised.com> wrote:
Hi all,
I'm using CSS styling, which works great, but I have an issue with unit of
measure for a value that is calculated with an expression. According to
this
post: http://geo-solutions.blogspot.it/2014/01/css-uom.html the uom
annotations are now supported in SLD, so they are not converted by CSS
module. So how to use uom with an expression? My old SLD was:
<PointSymbolizer
uom="http://www.opengeospatial.org/se/units/metre"> ;
<Graphic>
...
<Size>
<ogc:Mul>
<ogc:PropertyName>length</ogc:PropertyName>
<ogc:Literal>6</ogc:Literal>
</ogc:Mul>
</Size>
</Graphic>
</PointSymbolizer>
How can I achieve this with CSS?
Hmm... something like this I believe (but I haven't tried it):
mark-size: [6 * lenght]m
and if that does not work, maybe this:
mark-size: [strConcant(6 * lenght, "m")]
I don't remember if this is available only on the 2.5.x series, or is also
backported
to a recent 2.4.x release.
Cheers
Andrea
--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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
-------------------------------------------------------
uki
February 14, 2014, 11:04am
3
Hi Andrea, I have tried both options, none of them work in my 2.4.4 version.
Should I try 2.5?
Thanks!
Lukasz
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/CSS-style-unit-of-measure-expression-tp5103806p5103813.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
On Fri, Feb 14, 2014 at 12:04 PM, uki <ukiz@anonymised.com> wrote:
Hi Andrea, I have tried both options, none of them work in my 2.4.4
version.
Should I try 2.5?
If you have time, yes, right now I cannot check what actual version would
work
Cheers
Andrea
--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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
-------------------------------------------------------
uki
February 17, 2014, 11:07am
5
As a temporary workaround to use in my 2.4.4 version I put:
mark-size: [20000 * length / env('wms_scale_denominator')]
Looks ok on my screen, but I'm not sure how robust this is.
Lukasz
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/CSS-style-unit-of-measure-expression-tp5103806p5104208.html
Sent from the GeoServer - User mailing list archive at Nabble.com.