GeomFromGeoJSON

Teradata Vantageā„¢ JSON Data Type

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K

Purpose

The GeomFromGeoJSON function converts a JSON document that conforms to the GeoJSON standards into an ST_Geometry object.

Syntax



TD_SYSFNLIB
The name of the database where the function is located.
geojson_expr
An expression which evaluates to a JSON document conforming to the GeoJSON standards as specified in https://tools.ietf.org/html/rfc7946 . The GeoJSON text string can be represented as a VARCHAR, CLOB, or JSON instance in the LATIN or UNICODE character set.
This GeoJSON text string must represent a geometry object. The value of the type member must be one of these strings: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "GeometryCollection".
asrid
An integer which specifies the Spatial Reference System (SRS) identifier assigned to the returned ST_Geometry object.

Return Value

An ST_Geometry object which contains the data that was stored in the JSON document.

Usage Notes

The GeoJSONFromGeom and GeomFromGeoJSON functions operate on or produce data in the JSON text format. They cannot be used on JSON data that is stored in one of the binary formats. However, JSON data stored in a binary format can be cast to/from its text representation to interact with these functions. The casting can be done implicitly, so little effort is needed to perform this operation.

ANSI Compliance

This function is not compliant with the ANSI SQL:2011 standard.