/** * Returns the next precise <code>Coordinate</code> in the stream. * *@param tokenizer tokenizer over a stream of text in Well-known Text * format. The next element returned by the stream should be a number. *@return the next array of <code>Coordinate</code>s in the * stream. *@throws IOException if an I/O error occurs *@throws ParseException if an unexpected token was encountered * *@deprecated in favor of functions returning {@link CoordinateSequence}s */ private Coordinate getPreciseCoordinate(StreamTokenizer tokenizer) throws IOException, ParseException { Coordinate coord = new Coordinate(); coord.x = getNextNumber(tokenizer); coord.y = getNextNumber(tokenizer); if (isNumberNext(tokenizer)) { coord.setZ(getNextNumber(tokenizer)); } if (isNumberNext(tokenizer)) { getNextNumber(tokenizer); // ignore M value } precisionModel.makePrecise(coord); return coord; }
sequence.setOrdinate(0, CoordinateSequence.X, precisionModel.makePrecise(getNextNumber(tokenizer))); sequence.setOrdinate(0, CoordinateSequence.Y, precisionModel.makePrecise(getNextNumber(tokenizer))); sequence.setOrdinate(0, CoordinateSequence.Z, getNextNumber(tokenizer)); if (ordinateFlags.contains(Ordinate.M)) sequence.setOrdinate(0, CoordinateSequence.Z + offsetM, getNextNumber(tokenizer)); sequence.setOrdinate(0, CoordinateSequence.Z, getNextNumber(tokenizer));