Robert Jacolin wrote: > For my information, can you precise this 'wack of more stuff' ? Why > don't you use them ? > They support all kinds of things like associations; more complicated topology stuff (like networks) and xml format for coordinate reference systems and so on. GML out of the box is kind of like a class diagram; you can use it to represent anything (this is what all the big PDF is about; rather than the xml schema which you use to describe your data).
Some of the stuff we don't use because we don't have a representation of it yet in Java land; others like associations we don't use because we have only just created to representation in the last couple months. > GML 3 seems a little used (and no SAX parser exists in geotools). > The parser Justin described feeds on SAX events; the SAX parser for GML2 is still around but you cannot use it for all GML2 (ie it will recognize a LineString but if you extend LineString into a "Road" then you are out of luck - it would be valid GML2 but the SAX parser could not handle it). The parser Justin linked you to looks at the schema as it is taking in the SAX events, notices that "Road" is a LineString and parses it as such... > 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. > Depending on your analysis you may be able to stream the file (and not load it into memory). > 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... > You should be able to register a binding for DirectPosition and get it to make your own class; at the very least the binding for direct position will see all the coordinates (even if they occur with a different name). Note in GML3 a coordinate is called a Position and can occurs as wither one of two things a Point (a full geometry in its own right) or as a DirectPosition. Since you are working with your own file format you should be able to limit what occurs. Jody ------------------------------------------------------------------------- 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
