protected MultiLineStringEncoder(Encoder encoder, String gmlPrefix) { super(encoder); lse = new LineStringEncoder(encoder, gmlPrefix); lre = new LinearRingEncoder(encoder, gmlPrefix); multiLineString = MULTI_LINE_STRING.derive(gmlPrefix); lineStringMember = LINE_STRING_MEMBER.derive(gmlPrefix); }
protected MultiPointEncoder(Encoder encoder, String gmlPrefix) { super(encoder); pe = new PointEncoder(encoder, gmlPrefix); multiPoint = MULTI_POINT.derive(gmlPrefix); pointMember = POINT_MEMBER.derive(gmlPrefix); }
protected PolygonEncoder(Encoder encoder, String gmlPrefix) { super(encoder); lre = new LinearRingEncoder(encoder, gmlPrefix); polygon = POLYGON.derive(gmlPrefix); outerBoundary = OUTER_BOUNDARY.derive(gmlPrefix); innerBoundary = INNER_BOUNDARY.derive(gmlPrefix); }
/** * Writes a GML2 coordinates element * * @param cs * @throws SAXException */ public void coordinates(CoordinateSequence cs) throws SAXException { startElement(coordinates, null); coordinates(cs, ',', ' ', sb); characters(sb); endElement(coordinates); }
@Override public void registerGeometryEncoders( Map<Class, GeometryEncoder> encoders, Encoder encoder) { encoders.put(Point.class, new PointEncoder(encoder, gmlPrefix)); encoders.put(MultiPoint.class, new MultiPointEncoder(encoder, gmlPrefix)); encoders.put(LineString.class, new LineStringEncoder(encoder, gmlPrefix)); encoders.put(LinearRing.class, new LinearRingEncoder(encoder, gmlPrefix)); encoders.put(MultiLineString.class, new MultiLineStringEncoder(encoder, gmlPrefix)); encoders.put(Polygon.class, new PolygonEncoder(encoder, gmlPrefix)); encoders.put(MultiPolygon.class, new MultiPolygonEncoder(encoder, gmlPrefix)); encoders.put( GeometryCollection.class, new GeometryCollectionEncoder(encoder, gmlPrefix)); }
/** * Derives a new {@link QualifiedName} with the given prefix, or returns itself if the prefix is * the same alredy in use * * @param prefix * @return */ public QualifiedName derive(String prefix) { return derive(prefix, getNamespaceURI()); }
public void endFeatures(GMLWriter handler) throws Exception { if (!encodeSeparateMember) { handler.endElement(featureMembers); } }
public void startFeature(GMLWriter handler) throws Exception { if (encodeSeparateMember) { handler.startElement(featureMember, null); } }
protected MultiPolygonEncoder(Encoder encoder, String gmlPrefix) { super(encoder); pe = new PolygonEncoder(encoder, gmlPrefix); multiPolygon = MULTI_POLYGON.derive(gmlPrefix); polygonMember = POLYGON_MEMBER.derive(gmlPrefix); }
/** * Writes a single x/y position, without wrapping it in any element * * @param x * @param y * @throws SAXException */ public void position(double x, double y, double z) throws SAXException { position(x, y, z, sb); characters(sb); }
/** * Encodes a geometry value * * @param geometry The Geometry to be encoded * @param atts Its attributes * @param handler The handler used to write XML * @throws Exception */ public void encode(T geometry, AttributesImpl atts, GMLWriter handler) throws Exception { encode(geometry, atts, handler, null); } }
/** * Encodes the provided coordinates sequence, if encoding of measures is enabled this method * will encode all the available ordinates. * * @param coordinates the coordinates sequence */ public void position(CoordinateSequence coordinates) throws SAXException { coordinates(coordinates, ' ', ' ', sb); characters(sb); }
public void endFeature(GMLWriter handler) throws Exception { if (encodeSeparateMember) { handler.endElement(featureMember); } }
@Override public void startTuple(GMLWriter handler) throws SAXException { handler.startElement(member, null); handler.startElement(tuple, null); }
@Override public void endTuple(GMLWriter handler) throws SAXException { handler.endElement(tuple); handler.endElement(member); } }
public void startFeatures(GMLWriter handler) throws Exception { if (!encodeSeparateMember) { handler.startElement(featureMembers, null); } }