Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I read data from a SDE database (Oracle) directly. How do I know, which format is used to store the geometry data? Do I have to check the DataType for the geometry column or is this information available in one of the global tables?

share|improve this question
add comment

2 Answers

You can run the command "desc [feature class name];" in SQL Plus (Or any other way you access oracle"

Look at the Shape columns data type, that should tell you which Geometry type is used, for instance:

SQL> desc roads;

Name        NULL?       Type
------------------------------------
OBJECTID    NOT NULL    NUMBER(38)
FNODE_                  NUMBER(38)
TNODE_                  NUMBER(38)
LPOLY_                  NUMBER(38)
RPOLY_                  NUMBER(38)
LENGTH                  NUMBER(38,8)
ROADS_                  NUMBER(38)
ROADS_ID                NUMBER(38)
NAME                    NVARCHAR2(30)
ALTERNATE_NAME_1        NVARCHAR2(30)
ALTERNATE_NAME_2        NVARCHAR2(30)
ROAD_DIRECTION          NVARCHAR2(4)
LANE_DIRECTION          NVARCHAR2(2)
SHAPE                   SDE.ST_GEOMETRY

SHAPE SDE.ST_GEOMETRY

share|improve this answer
    
I think there is a stereoooo –  Justin Mar 15 '12 at 23:12
add comment

In order to get default geometry storage format (in most cases all your data will be in default format) you can run SQL query:

SELECT config_string FROM DBTUNE WHERE keyword='DEFAULTS' AND parameter_name='GEOMETRY_STORAGE'

But this default variable can be overrided of course.

UPDATE

To get shape column name and type you can execute such SQL query:

select spatial_column, layer_config from sde.LAYERS where table_name = 'YOUR_FEATURECLASS_NAME'

Column type can have next values:

  1. DEFAULT - then default geometry type can be determined from the first query.
  2. Overridden geometry type, for example SDO_GEOMETRY.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.