Partager via


Classe d’erreur GEOJSON_PARSE_ERROR

SQLSTATE : 22023

Erreur lors de l’analyse de GeoJSON : <parseError> à la position <pos>

Paramètres

  • parseError : description de l’erreur d’analyse rencontrée.
  • pos : position basée sur 1 dans la chaîne GeoJSON où l’erreur d’analyse s’est produite.

Explication

Certaines fonctions géospatiales peuvent retourner cette erreur lors de l’analyse de l’entrée, qui doit être au format GeoJSON. En savoir plus sur le format GeoJSON.

Exemples

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

Fonctions émettant la classe d’erreur