[mapserver-users] Scripted geoprocessing

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue Jun 5 10:01:35 PDT 2012


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.

Steve 

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Sam Skinner
Sent: Friday, June 01, 2012 6:34 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Scripted geoprocessing

Hi all,
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?

Thanks!

--
Sam Skinner (Mapserver admin and newbie) Yukon Land Use Planning Council


_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list