<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Sam,<br><br>Define "simpler" :-)<br><br>I could do it in Postgis with a few lines of script, but you'd need to install Postgis.<br><br>Postgis essentially has the code already written, you just need to deploy it. Other approaches may require less in the way of installation & more in the way of writing your own code...<br><br>On a Linux box, especially a mainstream distro, Postgis is trivial to install & manage, so it would be hard to be simpler. If you need to compile, etc, then there are other ways that could be simpler.<br><br>Cheers,<br><br>  Brent<br><br>--- On <b>Wed, 6/6/12, Lime, Steve D (DNR) <i><Steve.Lime@state.mn.us></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Lime, Steve D (DNR) <Steve.Lime@state.mn.us><br>Subject: Re: [mapserver-users]
 Scripted geoprocessing<br>To: "Sam Skinner" <sam@planyukon.ca>, "mapserver-users@lists.osgeo.org" <mapserver-users@lists.osgeo.org><br>Date: Wednesday, June 6, 2012, 5:01 AM<br><br><div class="plainMail">Hi Sam: MapScript does have GEOS functions built into it so you might be able to use just those. I remember doing something along these line using Perl MapScript. I don't have the script handy but I think I used a hash of shapes based on the attribute value in question. For each shape you simple add all the parts to the right hash element. Could either use the Union operator or just add the parts. Then once you have processed every feature in the shapefile(s) you do a buffer(0) on each of the hash elements with I think effectively does a dissolve. Of course you need to save the dissolved shape someplace too. In Perl this is not a very long script: a loop to build the hash of shapes and another loop to process the hash.<br><br>Steve
 <br><br>-----Original Message-----<br>From: <a ymailto="mailto:mapserver-users-bounces@lists.osgeo.org" href="/mc/compose?to=mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a ymailto="mailto:mapserver-users-bounces@lists.osgeo.org" href="/mc/compose?to=mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Sam Skinner<br>Sent: Friday, June 01, 2012 6:34 PM<br>To: <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>Subject: [mapserver-users] Scripted geoprocessing<br><br>Hi all,<br>I am writing a python script that will (weekly) download and extract data (shapefiles) from an organization without a WMS or WFS. This script will reside on my linux-based mapserver (5.6). I am looking for a way for this script to dissolve polygons with a common attribute. This will help rendering
 speed and ease of visualization. Any ideas on how I could do this? From what I understand (which isn't much!), I could import the data into PostGIS, then run some query there. Is there a simpler way? Is anyone familiar with Sextante, and would that work?<br><br>Thanks!<br><br>--<br>Sam Skinner (Mapserver admin and newbie) Yukon Land Use Planning Council<br><br><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">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><br><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org"
 href="/mc/compose?to=mapserver-users@lists.osgeo.org">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></blockquote></td></tr></table>