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.