2 wjy407199 wjy407199 于 2017.01.16 11:38 提问

求问 oracle sdo_relate 查不到数据

mask多个条件查不到数据

 SELECT t.gwm_fid

            FROM gs_grid_info t,gs_grid_p p
           WHERE sdo_relate(p.gwm_geometry,
                            (SELECT tt.gwm_geometry
                               FROM gs_grid_p tt 
                              WHERE tt.gwm_fid = 3501522),
                          **  'MASK=CONTAINS+INSIDE+COVEREDBY+COVERS+OVERLAPBDYDISJOINT+OVERLAPBDYINTERSECT+EQUAL') ='TRUE'**
             AND t.gwm_fid = p.gwm_fid
             AND t.grid_type_id =102
             AND t.districtid = (SELECT info.districtid
                                    FROM gs_grid_info info
                                   WHERE info.gwm_fid = 3501522);

mask单个条件可以查到

 SELECT t.gwm_fid

            FROM gs_grid_info t,gs_grid_p p
           WHERE sdo_relate(p.gwm_geometry,
                            (SELECT tt.gwm_geometry
                               FROM gs_grid_p tt 
                              WHERE tt.gwm_fid = 3501522),
                          **  'MASK=CONTAINS') ='TRUE'**
             AND t.gwm_fid = p.gwm_fid
             AND t.grid_type_id =102
             AND t.districtid = (SELECT info.districtid
                                    FROM gs_grid_info info
                                   WHERE info.gwm_fid = 3501522);

1个回答

wjy407199
wjy407199   2017.02.09 15:15
已采纳

最后终于找到了问题,是因为数据最初生成图形时有两个点重复了,导致了这个问题,
解决方法是将图形数据导入arcgis,检测自相交,从而解决了问题

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!