发布网友 发布时间:2022-04-07 17:22
共5个回答
懂视网 时间:2022-04-07 21:44
First ,we should find the most nearest road to the point from all roads in haerbin;
Second, we should find the most nearest point to the point from the road.
For example, as figure 1 ,we will do the map match for the point O.
First ,we choose the most nearest road A by compare the distance between O and A with the distance between O and B.
Second, we choose the most nearest point A3 by compare the distance between O and A1,
the distance between O and A2, the distance between O and A3 with the distance between O and A4.
Figure 1
select g.id into abcid from h_gl g where
sdo_nn(g.geom,SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(In_X,In_Y, null),NULL,NULL),‘SDO_NUM_RES=1‘)=‘TRUE‘;
Select sdo_lrs.convert_to_lrs_geom(sdo_lrs.project_pt(g.geom,m.DIMINFO, sdo_geometry(3001, 8307,
null, sdo_elem_info_array(1, 1,1), sdo_ordinate_array(In_X, In_Y, null))))
v_sql :=‘update table t set t.road_id=‘||abcid||‘,t.longtitude_newgps =‘||v_taxi_pt.SDO_ORDINATES(1) ||‘,
t.latitude_newgps=‘||v_taxi_pt.SDO_ORDINATES(2)||‘ where t.gpsdata_id =‘||IN_GPSDATA_ID;
[Oracle]在数据库中实现地图匹配
标签:
热心网友 时间:2022-04-07 18:52
如果是oracle 10g以上版本,可以用regexp_substr函数进行正则表达式匹配,这样处理字符匹配就更容易了!相关方法可以在百度中搜索oracle regexp_substr!热心网友 时间:2022-04-07 20:10
这种匹配程度在关系数据库里面很难做到的,匹配度建议还是拿出结果后在程序里面处理。。。单sql处理匹配度很难热心网友 时间:2022-04-07 21:44
select * from tab_name where col_1 like ‘%aaa’ order by col_1;热心网友 时间:2022-04-07 23:36
现出查询结果,再想着排列吧...