فئة الخطأ GEOJSON_PARSE_ERROR

SQLSTATE: 22023

خطأ في تحليل GeoJSON: <parseError> في الموضع <pos>

المعلمات

  • parseError: وصف خطأ التحليل الذي تمت مصادفته.
  • pos: الموضع المستند إلى 1 في سلسلة GeoJSON حيث حدث خطأ التحليل.

الشرح

قد ترجع بعض الدالات الجغرافية المكانية هذا الخطأ عند تحليل الإدخال، ومن المتوقع أن يكون بتنسيق GeoJSON. تعرف على المزيد حول تنسيق GeoJSON .

الأمثلة

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

الدالات التي تنبعث منها فئة الخطأ