public GeometryTranslator( ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding) { this(handler, prefix, nsUri); coordWriter = new CoordinateWriter(numDecimals, padWithZeros, forceDecimalEncoding, false); coordWriter.setPrefix(prefix); coordWriter.setNamespaceUri(nsUri); }
public int getNumDecimals() { return coordWriter.getNumDecimals(); }
public boolean isDummyZEnabled() { return coordWriter.isDummyZEnabled(); }
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri) { super(handler, prefix, nsUri); coordWriter.setPrefix(prefix); coordWriter.setNamespaceUri(nsUri); }
/** * Write the provided list of coordinates out. * * <p>There are a range of constants that control exactly what is written: * * <ul> * <li>useDummyZ: if true dummyZ will be added to each coordiante * <li>namespaceAware: is true the prefix and namespaceUri will be used * <li> * </ul> * * @param c * @param output * @throws SAXException * @deprecated use #writeCoordinates(CoordinateSequence, ContentHandler) instead */ public void writeCoordinates(Coordinate[] c, ContentHandler output) throws SAXException { writeCoordinates(new CoordinateArraySequence(c), output); }
public boolean getPadWithZeros() { return coordWriter.getPadWithZeros(); }
public boolean getForceDecimalEncoding() { return coordWriter.getForceDecimalEncoding(); }
formatDecimal(x, coordBuff); coordBuff.append(coordinateDelimiter); formatDecimal(y, coordBuff); formatDecimal(z, coordBuff);
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri ) { super(handler,prefix,nsUri); coordWriter.setPrefix( prefix ); coordWriter.setNamespaceUri( nsUri ); }
coordSeq = ((Point) geometry).getCoordinateSequence(); try { coordWriter.writeCoordinates(coordSeq, contentHandler); } catch (SAXException e) { throw new RuntimeException(e); coordSeq = ((LineString) geometry).getCoordinateSequence(); try { coordWriter.writeCoordinates(coordSeq, contentHandler); } catch (SAXException s) { throw new RuntimeException(s);
public GeometryTranslator( ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled) { this(handler, prefix, nsUri); coordWriter = new CoordinateWriter( numDecimals, padWithZeros, forceDecimalEncoding, isDummyZEnabled); coordWriter.setPrefix(prefix); coordWriter.setNamespaceUri(nsUri); } /**
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri ) { super(handler,prefix,nsUri); coordWriter.setPrefix( prefix ); coordWriter.setNamespaceUri( nsUri ); }
private void writePolygon(Polygon geometry) { String outBound = "outerBoundaryIs"; String lineRing = "LinearRing"; String inBound = "innerBoundaryIs"; start(outBound); start(lineRing); CoordinateSequence coordSeq; try { coordSeq = geometry.getExteriorRing().getCoordinateSequence(); coordWriter.writeCoordinates(coordSeq, contentHandler); } catch (SAXException s) { throw new RuntimeException(s); } end(lineRing); end(outBound); for (int i = 0, ii = geometry.getNumInteriorRing(); i < ii; i++) { start(inBound); start(lineRing); try { coordSeq = geometry.getInteriorRingN(i).getCoordinateSequence(); coordWriter.writeCoordinates(coordSeq, contentHandler); } catch (SAXException s) { throw new RuntimeException(s); } end(lineRing); end(inBound); } }
public int getNumDecimals(){ return coordWriter.getNumDecimals(); }
public boolean isDummyZEnabled(){ return coordWriter.isDummyZEnabled(); }
public static class GeometryTranslator extends TranslatorSupport { protected CoordinateWriter coordWriter = new CoordinateWriter(); this(handler, prefix, nsUri); coordWriter = new CoordinateWriter( numDecimals, padWithZeros, isDummyZEnabled, dimension); coordWriter.setPrefix(prefix); coordWriter.setNamespaceUri(nsUri);
coords[3] = bounds.getMaxY(); CoordinateSequence coordSeq = new PackedCoordinateSequence.Double(coords, 2, 0); coordWriter.writeCoordinates(coordSeq, contentHandler); } catch (SAXException se) { throw new RuntimeException(se);
public int getNumDecimals(){ return coordWriter.getNumDecimals(); }
public boolean isDummyZEnabled(){ return coordWriter.isDummyZEnabled(); }
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals) { this(handler,prefix,nsUri); coordWriter = new CoordinateWriter(numDecimals, false); coordWriter.setPrefix( prefix ); coordWriter.setNamespaceUri( nsUri ); }