PostGIS到Oracle查询转换

时间:2019-07-19 17:36:16

标签: oracle plsql oracle11g postgis oracle-spatial

我尽了最大的努力来转换此查询,但我只是失败了。甲骨文的一些专家帮助会很棒。谢谢:)

select * from (
    select 
        st_setsrid(st_makepoint(ee.startLng, ee.starLat), 4326) as geomstart,
        st_setsrid(st_makepoint(ee.endLng, ee.endLat), 4326) as geomend
    from events ee
) e
inner join (
    select 
        (st_dump(st_linemerge(st_locatebetween(geom,6.1199,59.5117)))).geom
        , route 
        from  (
            select 
                st_makeline(
                    st_setsrid(
                        st_makepointm(rp.lng,rp.lat,rp.m)
                        ,4326
                    ) 
                    order by rp.m 
                ) as geom
                , max(lr.route) as route
                , max(lr.id) as routeid
            from rpoints rp 
            inner join routes lr 
            on lr.id = rp.route_id 
            where lr.id = 9
        ) m
) l
on st_dwithin(e.geomstart,l.geom, 0.00001) or ST_DWITHIN(e.geomend, l.geom, 0.00001)

查询在这里。

0 个答案:

没有答案