Hi Friends,<br>               I am really stuck up with this for a long time now. As far as I have googled, I have found that to draw a circle, either using a mapfile or dynamically using a mapscript, the circle has to be defined by two set of points of its bounding rectangle. The image that I get on my screen is a circle (because the layer is defined as a circle), but to draw this circle, a set of two points is used which ultimately is a line. I will provide my code sample below,<br>
<br>DrawCircle(double x, double y, double dRadius)<br>{<br>         double minx = x - dRadius;<br>         double miny = y + dRadius;<br>         double maxx = x + dRadius;<br>         double maxy = y - dRadius;<br><br>         //upper left corner of the bounding rectangle<br>
         pointObj oPointMin = pixel2point(new pointObj(minx, miny, 0, 0));<br>        <br>        //lower right corner of the bounding rectangle<br>         pointObj oPointMax = pixel2point(new pointObj(maxx, maxy, 0, 0));<br>
<br>         lineObj oLine = new lineObj();<br>         oLine.add(oPointMin);<br>         oLine.add(oPointMax);<br>         shapeObj oShp = new shapeObj((int)MS_SHAPE_TYPE.MS_SHAPE_LINE);<br>          oShp.add(oLine);<br>
<br>        // Creation of a temporary layer (for circle)<br>                       layerObj oTempLayer = new layerObj(map);<br>                        oTempLayer.name = "UserCircle";<br>                        oTempLayer.status = 1;<br>
                        oTempLayer.type = MS_LAYER_TYPE.MS_LAYER_CIRCLE;<br>                        classObj oTempClass = new classObj(oTempLayer);<br>                        styleObj oStyle = new styleObj(oTempClass);<br>
                        oStyle.outlinecolor.setRGB(0, 0, 0);<br>                        oStyle.color.setRGB(255, 227, 255);<br>                        oTempLayer.addFeature(oShp);<br><br>         In the last line, I add the shape object to the temporary layer and then draw that layer which thus gives me a circle. But now, I want to find the intersection of this circle with the underlying layer features which I am unable to do, as the circle is not actually a circle or polygon that will give me the intersection and thus the area of intersection.<br>
<br>The link <span style="color: rgb(51, 51, 255);"><a href="http://lists.dmsolutions.ca/pipermail/mapserver-users/2004-March/016983.html">http://lists.dmsolutions.ca/pipermail/mapserver-users/2004-March/016983.html</a>  <font color="#333333">has a code sample to draw a circle with polygon but that code doesn't seem to work because it does not give me a circle but some other shaped polygon.<br>
<br><br>Friends, please help me with this problem.<br><br>Thanks,<br>Sucharita.<br></font></span>