WKT_PARSE_ERROR 错误类

SQLSTATE:22023

分析 WKT 时出错:<pos> 位置处的 <parseError>

Parameters

  • parseError:描述遇到的分析错误类型。
  • pos:发生分析错误的 WKT 字符串中从 1 开始的位置。

解释

当解析输入时,某些地理空间函数可能会返回此错误,因为期望输入采用已知文本(WKT)格式。 了解有关 WKT 的详细信息。

例子

-- Feeding an empty point in WKT format into the h3_polyfillash3 function (as opposed to a polygon or multipolygon).
> SELECT h3_polyfillash3('POINT EMPTY', 2)
  [WKT_PARSE_ERROR] Error parsing WKT: Invalid or unsupported type 'POINT' at position 1

-- Feeding a polygon with less than 4 vertices into the h3_polyfillash3 function.
> SELECT h3_polyfillash3('POLYGON((-122.4194 37.7749,-118.2437 34.0522,-74.0060 40.7128))', 2)
  [WKT_PARSE_ERROR] Error parsing WKT: Too few points in ring at position 63

发出错误类的函数