/** * Creates a <code>LineString</code> using the next token in the stream, the provided dimension * and measures will be used to create the <code>LineString</code>. */ private LineString readLineStringText(int dimension, int measures) throws IOException, ParseException { if (measures == 0) { // default situation, capable of handle elevations but no measures return geometryFactory.createLineString(getCoordinates()); } // handle linestring subtypes with measures (elevation and measures) return geometryFactory.createLineString( buildCoordinateSequence(getCoordinates(true), dimension, measures)); }