getPreciseCoordinate method

Coordinate getPreciseCoordinate(
  1. WKTTokenizer tokenizer
)

Returns the next precise Coordinate 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 Coordinates 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

Implementation

Coordinate getPreciseCoordinate(WKTTokenizer tokenizer) {
  Coordinate coord = Coordinate.empty2D();
  coord.x = getNextNumber(tokenizer);
  coord.y = getNextNumber(tokenizer);
  if (isNumberNext(tokenizer)) {
    coord.z = getNextNumber(tokenizer);
  }
  if (isNumberNext(tokenizer)) {
    getNextNumber(tokenizer); // ignore M value
  }
  precisionModel.makeCoordinatePrecise(coord);
  return coord;
}