<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Maddy,<div><br></div><div>I'd look into GDAL and/or Grass, since to do such area and perimeter calculations in real world units you'll have more success working with the data using software that understands coordinate systems.</div><div><br></div><div>Both GDAL and Grass have possibilities for scripting in python.</div><div><br></div><div>If you can figure out how to do feature-based summaries with pure python and PIL, I'd be interested to hear about your approach.</div><div><br></div><div>Dane</div><div><br></div><div><br><div><div>On Nov 28, 2008, at 8:05 AM, Mandar Sarlashkar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="Apple-interchange-newline">Dear all,<br><br>I am planning to use PIL in my assignment.<span class="Apple-converted-space"> </span><br><br>One of the tasks is to calculate index such as 'Patch Density' for a classified Land-use Land Cover Image.<span class="Apple-converted-space"> </span><br><br>I am not getting how to handle different class patches in an image.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">How can I retrieve information for each patch such as area and perimeter?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">I can use FRAGSTAS for getting such indices but a python script<br>or guidance how it can be done using python and PIL will be more helpful.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Thanking you for your time and consideration in advance.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Regards,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Maddy</div><br><hr>What's on the ramp today could be on the streets tomorrow. Keep up with trends on MSN Lifestyle<span class="Apple-converted-space"> </span><a href="http://lifestyle.in.msn.com/" target="_new">Try it!</a><span class="Apple-converted-space"> </span>_______________________________________________<br>Image-SIG maillist - <a href="mailto:Image-SIG@python.org">Image-SIG@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/image-sig">http://mail.python.org/mailman/listinfo/image-sig</a><br></span></blockquote></div><br></div></body></html>