A bit more action on the GMLEncoder front today.
We have access to the fast Transformer (is this legacy?)
GMLEncoder encode = new GMLEncoder( out, Version.GML2 );
encode.setNamespace("location", "http://localhost/location.xsd");
encode.setLegacy(true);
encode.encode( collection );
Straight up use of GML2 is not possible (no definition of feature collection!).
However ....
GMLEncoder encode = new GMLEncoder( out, Version.WFS1_0 );
encode.setNamespace("geotools","http://geotools.org");
encode.encode( collection );
And WFS 1.1:
GMLEncoder encode = new GMLEncoder( out, Version.WFS1_1 );
encode.setNamespace("geotools","http://geotools.org");
encode.encode( collection );
From an ease of use standpoint I am mostly seeing what I want; a single front
end that can talk to a number of different back ends, sometimes using wildly
different implementations.
Question: Static vs Wrapper vs Reuse
I did not reduce this to a single static final class; instead asking people to
create a GMLEncoder for their OutputStream. I am not sure if this is the best
idea? It is nice to implement; but it is still single use. We could pass the
OutputStream into each encode method; and reuse a GMLEncoder configuration that
has been setup? Any feedback on that one?
Question: namespace prefix
I am frankly confused on this one; the working examples; especially for writing
a FeatureCollection out using the Transformer would break if looked at them
funny.
Other code modified:
- cleaned up some SimpleFeatureBuilder javadocs etc...
- CRS.toSRS(final CoordinateReferenceSystem crs, boolean simple) added to
mirror use by Transform code
Request:
Justin could I ask for a review? Getting stuck between GeoServer code base and
test cases and confusing myself as a result.
Jody
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel