On Wed, Sep 4, 2013 at 9:47 AM, Frank Gasdorf
<[email protected]>wrote:

> Hello everybody,
>
> while we at uDIG make use of MetaBufferEstimator I run into the following
> issue:
>
> The features are LineStrings and the style has the following definition,
> represented as ans SLD fragement:
>
>                     <sld:LineSymbolizer>
>                         <sld:Stroke>
>                             <sld:CssParameter name="stroke">
>                                 <ogc:Literal>#008000</ogc:Literal>
>                             </sld:CssParameter>
>                             <sld:CssParameter name="stroke-width">
>                             <ogc:Function name="Categorize">
>
>   <ogc:PropertyName>myProperty</ogc:PropertyName>
>                                     <ogc:Literal>1</ogc:Literal>
>                                     <ogc:Literal>101</ogc:Literal>
>                                     <ogc:Literal>2</ogc:Literal>
>                                     <ogc:Literal>300</ogc:Literal>
>                                     <ogc:Literal>4</ogc:Literal>
>                                 </ogc:Function>
>                             </sld:CssParameter>
>                         </sld:Stroke>
>                     </sld:LineSymbolizer>
>
> Having the CategorizeFunction as Literal the Estimator returns false
> for isEstimateAccurate() which leads into logging massages in uDIG such as
> this:
>
> !MESSAGE Assuming rendering buffer = 0, but estimation is not accurate,
> you may want to set a buffer manually
>
> I expected an valid buffer size for this kind of Literal and assumed to
> get the greatest value, in this case 4.
>
> I've no idea if there are other Literal functions mere it could make sense
> to return the maximum value of all options. What do you think about
> extending functionality for strike-width values. I know that this would
> lead into several additional cast checks but I guess its worth to get an
> accurate estimate.
>

These new functions need some custom handling, but they could also be
applied to a graphic size,
I'd try to roll out a new method that gets and expression and
handles both the literal case, and the categorize/interpolate/recode
functions, returning the max value
for the expression (or -1 if no max value can be determined I guess)

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

-------------------------------------------------------
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to