<DIV id=RTEContent>Hi Steve,</DIV> <DIV> </DIV> <DIV>Thank you for your reply. I'll try it but may take so long time. I used to try postGIS, but grant problem came to me. Could you please pointing me to the right place to start playing with postGIS on Windows?<BR></DIV> <DIV>Thank you again.</DIV> <DIV>Krung<BR></DIV> <DIV><B><I>Stephen Woodbridge <woodbri@swoodbridge.com></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Krung Saengpole wrote:<BR>> Hi all,<BR>> <BR>> I'd like to compute partial area of polygon that intersects with another <BR>> polygon. Is there a way to do with PHPMapscript? For example, I want to <BR>> know how many square kilometers of forests that reside in the area of <BR>> 50km-radius circled area. Or where can I get to the example?<BR><BR>If you use PostGIS this is a straight forward SQL query like:<BR><BR>select polyid, area2d(intersection(the_geom,
circleAsPolygon(point(x, <BR>y), radius, npoints)) as area from mytable where the_geom && <BR>expand(point(x, y), radius);<BR><BR>where the_geom is the geometry column for the polygons<BR>and x,y is the center of your circle radius = 50000<BR>and npoints is the number of points to generate for the polygonal circle.<BR><BR>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 that <BR>if you needed us to.<BR><BR>-Steve<BR></BLOCKQUOTE> <DIV><BR></DIV><p>
                <hr size=1>Yahoo! for Good -
<a href="http://us.rd.yahoo.com/mail_us/taglines/charity/*http://brand.yahoo.com/cybergivingweek2005/">Make a difference this year.</a>