[GIS] Get Spatial Table Information Oracle Spatial

oracle-spatialsql

How can I get the tablename, Srid and GeometryType of all spatial tables in Oracle(I use 11g)?

In postgis, I can do something like

select f_table_name,srid,type from public.geometry_columns order by f_table_schema, f_table_name;

Does anything similar exist in Oracle?

Best Answer

The easy way is to select * from user_sdo_geom_metadata or select * from all_sdo_geom_metadata. This isn't as thorough as pecoanddeco's answer would provide but if your metadata is up to date it's pretty good.

Note that individual geometry rows can have different SRIDs from the metadata (although that will break spatial indexing). For geometry types your best bet is to look at the parameters on the spatial index, it's common (but not essential) to have a layer_gtype= parameter, eg layer_gtype=point.