怎么把Oracle SDO_JOIN转换成PostgreSQL PostGIS?

时间:2019-07-02 20:46:00

标签: postgresql postgis

我在Oracle中有一个查询,用于从my_polygon_table中选择与border_table内的单个多边形交互或驻留的多边形:

Select t1.*, t2.*, sdo_geom.sdo_intersection(t1.geoloc, t2.geom, 2 ) as genericgeo From table
 ( sdo_join ('my_border_table', 'geoloc', 'my_polygon_table', 'geom', 'mask=ANYINTERACT' ) ) j,
 my_border_table t1,my_polygon_table t2 
 Where 
 (j.rowId1 = t1.rowId and j.rowId2 = t2.rowId) and (t1.geoloc.sdo_gtype = 2003 or t1.geoloc.sdo_gtype = 2007) and (t2.geom.sdo_gtype = 2003 or t2.geom.sdo_gtype = 2007) 

到目前为止,我已经使用CREATE EXTENSION postgis;安装了几何图形并复制了表格。当我在pgAdmin中运行查询时,我得到了

ERROR:  syntax error at or near "table"
LINE 2: ...ntersection(t1.geoloc, t2.geom, 2 ) as genericgeo From table
                                                                  ^
SQL state: 42601
Character: 129

如何对PostgreSQL做同样的事情?

0 个答案:

没有答案