<DIV id=RTEContent>Hi Steve,</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thank you for your advice. I re-tried postgis again, it worked with a little debug message but not the case. I confused with postgresql and postgis geometry features. Could you please show me circleAsPolygon() function (user-defined)?</DIV>  <DIV>&nbsp;</DIV>  <DIV>TIA</DIV>  <DIV>Krung</DIV>  <DIV>&nbsp;</DIV>  <DIV>&gt;&gt; I'd like to compute partial area of polygon that intersects with <BR>another <BR>&gt; polygon. Is there a way to do with PHPMapscript? For example, I want <BR>to <BR>&gt;&gt; know how many square kilometers of forests that reside in the area of <BR>&gt;&gt; 50km-radius circled area. Or where can I get to the example?</DIV>  <DIV>&nbsp;</DIV>  <DIV>&gt;If you use PostGIS this is a straight forward SQL query like:</DIV>  <DIV>&gt;select polyid, area2d(intersection(the_geom, circleAsPolygon(point(x, <BR>y), radius, npoints)) as area from mytable where the_geom &amp;&amp; <BR>expand(point(x, y),
 radius);</DIV>  <DIV>&gt;where the_geom is the geometry column for the polygons<BR>and x,y is the center of your circle radius = 50000<BR>&gt;and npoints is the number of points to generate for the polygonal <BR>circle.</DIV>  <DIV>&gt;you would need to write a function circleAsPolygon() in pgsql, but that <BR>is pretty trivial and most of us that would with PostGIS could post <BR>&gt;that <BR>&gt;if you needed us to.</DIV>  <DIV>&gt;-Steve</DIV><p>
        
                <hr size=1>Yahoo! Photos<br> 
Got holiday prints? <a href="http://us.rd.yahoo.com/mail_us/taglines/holidayprints/*http://pa.yahoo.com/*http://us.rd.yahoo.com/mail_us/taglines/photos/evt=38089/*http://pg.photos.yahoo.com/ph//print_splash">See all the ways</a> to get quality prints in your hands ASAP.