Jaa


WKT_PARSE_ERROR error class

SQLSTATE: 22023

Error parsing WKT: <parseError> at position <pos>

Parameters

  • parseError: Description of the kind of parse error encountered.
  • pos: The 1-based position in the WKT string where the parse error occurred.

Explanation

Some geospatial functions may return this error when parsing the input, that is expected to be in well-known text (WKT) format. Learn more about WKT.

Examples

-- 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

Functions emitting the error class