ST_IsFormat function

The ST_IsFormat function takes a geometry as an input parameter and returns the format in which that geometry is stored.

Syntax

Read syntax diagramSkip visual syntax diagram ST_IsFormat ( geometry )

Parameter

geometry
A value of type ST_Geometry for which the geometry format is to be returned.

Return type

VARCHAR(8)

Example

The following code illustrates how to determine the format of a geometry.

CREATE TABLE sample_points (id INTEGER, geo ST_POINT)

INSERT INTO sample_points(id, geo) VALUES
       (1, ST_Geometry('point(1 2)', 1) ),
       (2, ST_Geometry('point(2 3)', 1) ),
       (99, ST_Geometry('point(1 2, 3)', 1) )

SELECT id, ST_IsFormat(geo) AS format
FROM sample_points

Results:

         ID      FORMAT
----------- -----------
          1         SDE
          2         SDE
         99         WKT