[geotk] jts -> geotk

sorel johann.sorel at geomatys.fr
Mon Feb 15 03:50:03 EST 2010


I am not sure if you are searching for GML (which is xml) or WKT 

1. To obtain WKT or WKB :
All the classes needed are in the JTS library : WKTReader, WKTWriter, 
WKBReader, WKBWriter.*
*here is an exemple :
WKTWriter writer = new WKTWriter();
String wkt = writer.write(myGeometry);

2. To obtain GML :
JAXPStreamFeatureWriter writer = new JAXPStreamFeatureWriter();
String gml = write(feature);

I hope this helps


Milo van der Linden wrote:
> Another, probably simple question.
> I currently have a jts based project where I write a point to a gml 
> string. I want to get rid of jts and do it with geotoolkit only.
> Is there something as simple as a gmlwriter to write a geometry to a 
> gmlstring?
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit

More information about the Geotoolkit mailing list