/// <summary> /// Parses a multipoint text. /// </summary> /// <param name="tokens">The list of tokens.</param> /// <param name="is3D">bool value indicating whether multipoint being parsed has z-coordinate.</param> /// <param name="isMeasured">bool value indicating whether multipoint being parsed has m-value.</param> /// <returns>A multipoint specified by tokens.</returns> /// <remarks><![CDATA[<multipoint text> ::= <empty set> | <left paren><point text> {<comma> <point text>}* <right paren>]]></remarks> private static MultiPoint ParseMultiPointText(WktTokensBuffer tokens, bool is3D, bool isMeasured) { WktToken t = tokens.Peek(true); if (t.Type == TokenType.STRING && t.Value.ToUpperInvariant() == "EMPTY") { tokens.GetToken(true); return(new MultiPoint()); } WktReader.Expect(TokenType.LEFT_PARENTHESIS, tokens); MultiPoint result = new MultiPoint(WktReader.ParsePoints(tokens, is3D, isMeasured)); WktReader.Expect(TokenType.RIGHT_PARENTHESIS, tokens); return(result); }