Justin Deoliveira a écrit : > Hi Robert, > > Hi, thank you for your answer ! > GML3 is quite different from GML2. The changes on teh geometry elements > that you noted are one of differences. The feature stuff is still pretty > similar. And then there is a wack of more stuff that we don't really use. > For my information, can you precise this 'wack of more stuff' ? Why don't you use them ? GML 3 seems a little used (and no SAX parser exists in geotools).
> So patching the GML2 parsing stuff is one alternative. However a full > blown gml3 parser / encoder has been written on geotools 2.4.x and > trunk. There are some docs here: > > http://docs.codehaus.org/display/GEOTDOC/GML+XML+Support > > The docs are a bit out of date, i apologize. But just use > org.geotools.gml3.Configuration and the code is the same. > > You may want to give the new parser a try and see how it goes. Are you > parsing straight gml? Or gml from a wfs? > GML is used without WFS in my project. I didn't use the gml3 parser because I wanted reuse some piece of code someone writted in the eXist project to index GML2 data. So I used the same mechanism which uses SAX events to parse the geometry elements : when a coordinate (coord, coordinate in gml 2, pos and posList in gml 3) is found, the points are sent to GMLFilterGeometry to build the Geometry object, ... It was very simple to integrate it (once I compiled eXist and geoTools :) ). If I use gml3.Configuration, I need to implement a new class in a very different way (more difficult to maintain and need more time to develop), load the file (it can be huge o what about the memory) and analyse it. But in the two ways, I'm not sure I will catch all coordinates and geometry to build, for example, if GML3 add new Geometry object... Regards, -- Robert JACOLIN M2M ANYWARE TECHNOLOGIES Tél : +33 (0)5.61.00.06.56 Fax : +33 (0)5 61 00 51 46 www.anyware-tech.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
