Hi Pierre,

I don't think your missing anything. It looks like only the parse bindings
for 2.2 have been implemented and not the encoding ones.

-Justin

On Tue, Nov 18, 2014 at 8:19 AM, Pierre Mauduit <
[email protected]> wrote:

> Hi list,
>
> I could not figure out by myself reading the code, but I stumbled upon a
> mail in the ML archive stating that writing KML in version 2.2 was not
> possible as for now[1], I wondered if since then, it was still the case.
>
> I've the following method, which receive a SimpleFeatureCollection as
> argument, then tries to dump into into a KML document:
>
> public String asKml(SimpleFeatureCollection collection) throws Throwable {
> Encoder encoder = new Encoder(new KMLConfiguration());
> encoder.setIndenting(true);
>
> ByteArrayOutputStream bas = new ByteArrayOutputStream();
> encoder.encode(collection, KML.kml, bas);
> return new String(bas.toByteArray());
> }
>
> Using "classical" KML (org.geotools.kml) is fine, I can find back my
> features in the generated KML, but using the v22 one (org.geotools.kml.v22,
> the generated output is empty.
>
> Am I missing something in the way I try to generate a KML document with
> the v22 version ?
>
> Best regards,
>
> [1]
> http://osgeo-org.1560.x6.nabble.com/improved-kml-parsing-td5019686.html#a5031572
>
> --
>
> Pierre Mauduit
>
> Ingénieur développement
>
> Camptocamp France SAS
>
> Savoie Technolac, BP 352
>
> 73377 Le Bourget du Lac, Cedex
>
> Tel (France) : +33 4 79 26 58 02
>
> Fax : 04 79 70 15 81
>
> Mail : [email protected] <[email protected]>
>
> http://www.camptocamp.com
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoTools-Devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>


-- 
Justin Deoliveira
VP Engineering | Boundless <http://boundlessgeo.com/>
[email protected]
@boundlessgeo <http://twitter.com/boundlessgeo/>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to