Oracle Spatial sdo_buffer function precision control

Source: Internet
Author: User

The sdo_geom.sdo_buffer function is used for buffer query. It has three parameters:

Param1: the geometric element to be queried.

Param2: the geometric elements used for filtering.

Param3: used to control the buffer radius value, buffer arc tolerance, and unit.

Now, I have a requirement to query the buffer zone of the first-line figure and draw the buffer zone on the map. Here is myCode:

Public String getbufferline (string linewkt, double distance ){
String response = "";
// The smaller the tolerace value, the more accurate the image is. 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 <map> result = This. getlistbyarg (SQL. tostring (), null );
If (result! = NULL & result. Size ()> 0 ){
Map one = result. Get (0 );
Response = one. Get ("WKT"). tostring ();
}
Return response;
}

the smaller arc_tolerance, the more precise the buffer image, and the larger the sdo_geoemtry, the slower the response time for drawing the image at the front end.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.