So far uDig is the major user of the SLD class. I am trying to migrate away from it to a StyleBuilder :-(
Can you change the return type to a float (cannot remember which direction automatic casting is allowed). int width = SLD.width( stroke ); // does this work when SLD returns a float? If not I recommend making use of your fallback idea... float width = SLD.width( stroke, 1.0 ); // default is actually a Float float width = SLD.width( stroke, null ); // will return a sensible default.... It is the second case which gave me trouble; for some of the SLD values the correct default depends on what they are being used for. Jody On 03/03/2010, at 7:48 PM, Andrea Aime wrote: > Hi, > today I've stumbled into a class that I did not know existed, the > SLD utility class (well, I actually made a commit on that class > three years ago but haven't used it since). > > The SLD utility has utility methods that return, for example, > the width of a stroke. > Unfortunately they are also broken, as they return only integer > widths, whilst our renderer and the sld spec works fine with > non integral widths. > > The internal methods in SLDStyleFactory use floats instead when > possible and allow for a fallback. > > I wish to remove this duplication by moving everything onto > the SLD class (which is also used by GS KML output) but > doing so would break its interface (changes of methods > outputs from int to float). > > Suggestions? > > Cheers > Andrea > > -- > Andrea Aime > OpenGeo - http://opengeo.org > Expert service straight from the developers. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Geotools-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
