Andrea,
Another issue came up with uoms, and this is also not specific to
device-size uoms, but with any uom already defined earlier. This is the
case of expressions, or rather, when using constants in expressions.
Consider for example the following:
<sld:PolygonSymbolizer uom="http://www.opengeospatial.org/se/units/metre">
<sld:Geometry>
<ogc:Function name="buffer">
<ogc:PropertyName>way</ogc:PropertyName>
<ogc:Literal>300</ogc:Literal>
</ogc:Function>
</sld:Geometry>
<sld:Fill>
<sld:CssParameter name="fill">#FF0000</sld:CssParameter>
<sld:CssParameter name="fill-opacity">0.4</sld:CssParameter>
</sld:Fill>
</sld:PolygonSymbolizer>
one would assume that the above would create a buffer of the polygon at
hand, with a 300m (real-world) distance from the original polygon. but,
what the current code does is that the buffer is 300 pixels from the
polygon. now, there is a simple omission in the code, in
UomRescaleStyleVisitor.visit(PolygonSymbolizer), the polygon's geometry
is not rescaled.. but even if one adds the following line:
rescale(copy.getGeometry(), mapScale, dpi, copy.getUnitOfMeasure());
the results is not what one would expect. the result of the above line
is basically equivalent to:
<sld:Geometry>
<ogc:Mul>
<ogc:Function name="buffer">
<ogc:PropertyName>way</ogc:PropertyName>
<ogc:Literal>300</ogc:Literal>
</ogc:Function>
<ogc:Literal>scale_factor</ogc:Literal>
</ogc:Mul>
</sld:Geometry>
which doesn't bring the desired result.
I wonder if this issue has been considered, and what the general
acceptance would be if one would implement a fix so that all literal
values inside such expressions are scaled, according to the uom scaling
factory.
best regards,
Akos
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel