Home >Database >Mysql Tutorial >Oracle spatial sdo_buffer函数精度控制

Oracle spatial sdo_buffer函数精度控制

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:22:361214browse

SDO_GEOM.sdo_buffer 函数用来做缓冲区查询使用,它有三个参数:其中arc_tolerance 越小,缓冲区图形越精确,同时也意味着sdo_ge

SDO_GEOM.sdo_buffer 函数用来做缓冲区查询使用,它有三个参数:
 
param1:需要查询的几何要素。
 
param2:用来过滤的几何要素。
 
param3:用来控制缓冲区半径值、缓冲弧容差和单位的控制。
 
当下,我有一个需求,对一线状地物进行缓冲区查询,并将缓冲区绘制在地图上。以下是我的代码:
 
public String getBufferLine(String lineWKT, double distance) {
  String response="";
  //tolerace值越小  图越精确    likehua  20121114
  StringBuffer  sql=new StringBuffer("select SDO_UTIL.to_wktgeometry(SDO_GEOM.sdo_buffer(SDO_GEOMETRY('"+lineWKT+"',8307),"+distance+",0.0002,'arc_tolerance=0.02 unit=m')) as wkt from dual");
  List result=this.getListByArg(sql.toString(), null);
  if(result!=null&&result.size()>0){
  Map one=result.get(0);
  response=one.get("WKT").toString();
  }
  return response;
 }
 
其中arc_tolerance 越小,缓冲区图形越精确,同时也意味着sdo_geoemtry越庞大,,导致在前端绘制图形的响应时间越慢。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn