<font color="#3366ff"><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><font color="#3366ff">Dear Josh,</font><div><font color="#3366ff"><br></font></div><div><font color="#3366ff"> Thanks for your great response.Yes You done my work around... Thanks alot..Let me work on that...i will update you once i done ...</font></div>
<div><font color="#3366ff"><br></font></div><div><font color="#3366ff">Thanks again.</font></div><div><font color="#3366ff"><br></font></div><div><font color="#3366ff">Ven</font></div></span></font><br><div class="gmail_quote">
On Tue, Sep 7, 2010 at 4:11 PM, Joshua Hevenor <span dir="ltr"><<a href="mailto:jhevenor@rogers.com">jhevenor@rogers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Ven, <br>First, I took a quick look at the php mapscript documentation (my preferred mapscript) and didn't see anything specific about splitting. Solving a more simplified problem might be a start.<br>
<br>Start by getting the bounding box of the polygon ($shp->bounds). <br>Get the two left side coordinates: $p1=(MinX, MaxY), $p2=(MinX, MinY)<br>Build a new polygon using these two points and the endpoints of your line. <br>
--> Assumption that your line is not horizontal or intersects the left edge of your bbox. <br><br>Use the shapeObj::intersection to get the half of your target polygon within the left half of the BBOX. <br><br>You can repeat this for the right half of the BBOX, or maybe use shapeObj::difference.<br>
<br>My first thoughts. <br><br>You could, alternatively, loop through all of $shp->lines(1..$shp->numlines) and checking for
intersection with your split line. A little bookkeeping would allow you to build your two split polygons from this. I think option 1 might be easier. <br><br>Hope this helps, <br><br>Josh<br><br>--- On <b>Tue, 9/7/10, venkat <i><<a href="mailto:ven.tammineni@gmail.com" target="_blank">ven.tammineni@gmail.com</a>></i></b> wrote:<br>
<blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px"><br>From: venkat <<a href="mailto:ven.tammineni@gmail.com" target="_blank">ven.tammineni@gmail.com</a>><br>Subject: [mapserver-users] Split Polygon using Clint or server side code not with PostGIS<br>
To: <a href="mailto:mapserver-users-request@lists.osgeo.org" target="_blank">mapserver-users-request@lists.osgeo.org</a>, <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
Date: Tuesday, September 7, 2010, 1:46 AM<div><div></div><div class="h5"><br><br><div><font color="#3366ff">Dear All,</font><div><font color="#3366ff"><br></font></div><div><font color="#3366ff"> How i can split polygon by client(JavaScript code) or Server side(C#).I have done splitting polygon using Postgis..I am not able to understand how to split
polygon by code(client or server side code.Please let me know .Its very urgent.</font></div>
<div><font color="#3366ff"><br></font></div><div><font color="#3366ff"> I am waiting for your great response.</font></div><div><font color="#3366ff"><br></font></div><div><font color="#3366ff">Thanks and Regards,</font></div>
<div><font color="#3366ff"><br></font></div><div><font color="#3366ff">Ven</font></div>
</div><br></div></div>-----Inline Attachment Follows-----<div class="im"><br><br><div>_______________________________________________<br>mapserver-users mailing list<br><a href="http://mc/compose?to=mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></div></blockquote></td></tr></tbody></table></blockquote></div><br>