/** * Converts a <code>Coordinate</code> to <code><Point></code> format, * then appends it to the writer. * *@param coordinate the <code>Coordinate</code> to process *@param writer the output writer to append to */ private void appendCoordinate(Coordinate coordinate, Writer writer) throws IOException { writer.write(writeNumber(coordinate.x) + " " + writeNumber(coordinate.y)); if (outputDimension >= 3 && ! Double.isNaN(coordinate.z)) { writer.write(" "); writer.write(writeNumber(coordinate.z)); } }
/** * Appends the i'th coordinate from the sequence to the writer * * @param seq the <code>CoordinateSequence</code> to process * @param i the index of the coordinate to write * @param writer the output writer to append to */ private void appendCoordinate(CoordinateSequence seq, int i, Writer writer) throws IOException { writer.write(writeNumber(seq.getX(i)) + " " + writeNumber(seq.getY(i))); if (outputDimension >= 3 && seq.getDimension() >= 3) { double z = seq.getOrdinate(i, 3); if (! Double.isNaN(z)) { writer.write(" "); writer.write(writeNumber(z)); } } }
/** * Converts a <code>Coordinate</code> to <code><Point></code> format, * then appends it to the writer. * *@param coordinate the <code>Coordinate</code> to process *@param writer the output writer to append to */ private void appendCoordinate(Coordinate coordinate, Writer writer) throws IOException { writer.write(writeNumber(coordinate.x) + " " + writeNumber(coordinate.y)); if (outputDimension >= 3 && ! Double.isNaN(coordinate.z)) { writer.write(" "); writer.write(writeNumber(coordinate.z)); } }
/** * Appends the i'th coordinate from the sequence to the writer * * @param seq the <code>CoordinateSequence</code> to process * @param i the index of the coordinate to write * @param writer the output writer to append to */ private void appendCoordinate(CoordinateSequence seq, int i, Writer writer) throws IOException { writer.write(writeNumber(seq.getX(i)) + " " + writeNumber(seq.getY(i))); if (outputDimension >= 3 && seq.getDimension() >= 3) { double z = seq.getOrdinate(i, 3); if (! Double.isNaN(z)) { writer.write(" "); writer.write(writeNumber(z)); } } }