共用方式為


GEOJSON_PARSE_ERROR 錯誤類別

SQLSTATE: 22023

解析 GeoJSON 時發生錯誤:<parseError> 位置 <pos>

Parameters

  • parseError:描述遇到的解析錯誤。
  • pos:GeoJSON 字串中以 1 為基礎的位置,該位置發生了解析錯誤。

Explanation

某些地理空間函式在剖析必須是 GeoJSON 格式的輸入時可能會傳回此錯誤。 了解更多關於 GeoJSON 格式的資訊。

Examples

-- Feeding an empty point in GeoJSON format into the h3_polyfillash3 function (as opposed to a polygon or multipolygon).
> SELECT h3_polyfillash3('{"type":"Point","coordinates":[]}', 2)
  [GEOJSON_PARSE_ERROR] Error parsing GeoJSON: Invalid or unsupported type '"Point"' at position 9

-- Feeding an polygon with invalid GeoJSON (missing closing } at the end)
> SELECT H3_PolyfillAsH3('{"type":"Polygon","coordinates":[[[-122.4194,37.7749],[-118.2437,34.0522],[-74.0060,40.7128],[-122.4194,37.7749]]]', 2)
  [GEOJSON_PARSE_ERROR] Error parsing GeoJSON: Unexpected end of GeoJSON string at position 115

發出錯誤類別的函式