6

I am having an issue with an Oracle query layer using SDO_Geometry not displaying.

I have created a polygon layer/table within oracle, registered the table with the SDO_GEOM_METADATA and created a spatial index...twice.

Unfortunately, I am still unable to see the polygons display in an ArcMap query layer. I am able to bring the data into ArcMap, open the table, select and identify it and actually see the shape flash, so I know it is there.

Also, I can export a shapefile and the shapes render perfectly fine, but for some reason they will not display from the query layer directly.

I have checked over the index parameters in the registry and nothing seems off, see:

INSERT INTO all_sdo_geom_metadata
            (owner,
             table_name,
             column_name,
             diminfo,
             srid)
     VALUES ('DB',
             'TABLE',
             'GEOM',
             MDSYS.sdo_dim_array (MDSYS.sdo_dim_element ('X',
            -180,180,5.0e-10), MDSYS.sdo_dim_element ('Y',-90,90,5.0e-10)),4326);
index creation:
CREATE  INDEX wm_dim_table_si ON TABLE (geom) INDEXTYPE IS MDSYS.spatial_index 
PARAMETERS ('tablespace=DB_INDEX03  layer_gtype=MULTIPOLYGON');

I've done everything, others have prescribed but I still can't view the data directly... Any hints as to what else I should try or should be looking at? Any help is greatly appreciated.

My nexts thoughts are that I should check and validate the geometry on the polygons. Also, there are about 30,000 polygons in this table, is there a threshold in ArcMap for query layers? It wouldn't seem so, however I am at a loss right now...

3
  • 1
    So a few things. In your metadata, you use 5.0e-10. For geographic coordinate systems that value is actually specified in meters. I think the minimum value is 0.05. Is your table really named table? Check the sde log files to see if there are any entries. You should be able to find them on the server SDE home dir if you are using three tier, or in the %temp% or desktop/etc dir.
    – travis
    Commented May 9, 2013 at 19:20
  • Hi- Thanks for your response! By min value, you mean the tolerance can't be any less than .05? No, my table is not actually named table :-). Why are the sde log files important? This table is actually a separately defined oracle table not registered with sde.-Sorry I am very new to all this. esp. sde administration. Commented May 14, 2013 at 13:48
  • Yes, the tolerance shouldn't be less than 0.05. (section 1.5.5 docs.oracle.com/cd/E11882_01/appdev.112/e11830/…) I had to ask about the table name....I have seen some strange things. :) Even though the table isn't registered with SDE, SDE is still converting the SDO_Geometry object to something ArcMap can draw. Even so often SDE will encounter a shape that is valid to Oracle, but invalid to SDE. ArcMap should indicate that a layer failed to draw. This doesn't always happen, but SDE will always put a entry into the logfiles. Usually of type Load buffer error.
    – travis
    Commented May 14, 2013 at 18:16

2 Answers 2

1

I think you have wrongly entered the SRID as 4326. In Oracle EPSG:4326 is equivalent to SRID:8307.

Try the following oracle SQL to create table, enter its details in METADATA and index it.

--Create table

CREATE TABLE country_list (sl_no NUMBER PRIMARY KEY, country VARCHAR2(50), boundary sdo_geometry);

--Insert into METADATA

INSERT INTO user_sdo_geom_metadata VALUES ('country_list', 'boundary', SDO_DIM_ARRAY (SDO_DIM_ELEMENT('Long', -180, 180, 0.00001), SDO_DIM_ELEMENT('Lat',   -90,  90, 0.00001)), 8307);

--Create index

CREATE INDEX country_list_SIDX on country_list (boundary) indextype is MDSYS.SPATIAL_INDEX;

If still you are not able to see the layer, give a try to Oracle Mapbuilder to see the preview of the loaded polygons. You need registration for downloading this mapbuilder.

If the mapbuilder shows the preview then the problem is with ArcMap not with Oracle.

0

Faced the same problem. As travis pointed out: the problem is caused by different validation criterias Oracle/Esri are using. Hence there's no absolut correctness. You'll have to adapt to your target visualization system (ArcGIS in your case)

You may need to correct your geometries with the ArcGIS Repair Geometry function.

After that the Oracle Spatial Query Layer should display correctly in ArcMap.

2
  • I did repair the geometries and rectified the geometries in oracle with a .05 tolerance but I still have the same issue. These polygons can be multi part features so I wonder if that has an impact...I'll have to try this with single part features only and see if it works...I have given up on this project for now as it isn't as urgent as it was previously...Will get back to you once I get back on it. Commented Sep 20, 2013 at 12:16
  • in my case multi part features didn't have an impact, but Oracle's collections definitly had.
    – stevo
    Commented Oct 14, 2013 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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