NielsFlohr
NielsFlohr

Reputation: 333

Get SRID of geometry column in exasol (ST_SRID equivalent)

It seems that there is no ST_SRID function in exasol like in other DBMS: SELECT ST_SRID(geom) FROM sampletable

Is there an efficient workaround to determine the SRID of a geometry column? So far I only had success in parsing the COLUMN_TYPE string from EXA_USER_COLUMNS of the table containing the geometry column, which seems a bit clumsy...

Upvotes: 1

Views: 185

Answers (1)

sirain
sirain

Reputation: 1158

There is no specific function for this in Exasol.

Besides using EXA_USER_COLUMNS you can also use TYPEOF if you are using Exasol 7.1. This is a scalar function that returns the data type of it's argument.

For example:

create or replace table t(a geometry, b geometry(1), c geometry(2));
insert into t values (null,null,null);
select regexp_substr(typeof(a), '[\d]*'), regexp_substr(typeof(b), '[\d]*'),regexp_substr(typeof(c), '[\d]*') from t;

Upvotes: 1

Related Questions