The origional documentation example he found showed how to use
SLDTransformer; Eclisia is stuck placing his Style object into a
StyleLayerDescriptor object. I cannot remember the details myself.
Eclesia you may need to leave the world of StyleBuilder behind and make
use of the StyleFactory directly; also feel free to add more methods to
StyleBuilder as needed (it is just a tool to make working with
StyleFactory easier).
Jody
> johann Sorel ha scritto:
>> I use a StyleBuidler class to create my Styles so they are like you
>> say : "naked".
>>
>> My objective is to have a grahic SLD editor, and i'm not far to have
>> a first working version.
>>
>> Problem is how do I make a SLD file with those GT styles ???
>
> Use the SLDTransformer class. It has a main inside showing how to parse
> an SLD file into gt2 objects, and then create back and sld
> representation out of the SLD objects:
>
> public static final void main(String[] args) throws Exception {
> java.net.URL url = new java.io.File(args[0]).toURL();
> SLDParser s = new SLDParser(
> CommonFactoryFinder.getStyleFactory( null), url);
> SLDTransformer transformer = new SLDTransformer();
> transformer.setIndentation(4);
> transformer.transform(s.readXML(),
> new FileOutputStream(System.getProperty("java.io.tmpdir")
> + "/junk.eraseme"));
> }
>
> Hope this helps
> Cheers
> Andrea
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel