[postgis-users] Creating a simple polygon encompassing a given number of points

René Fournier m5 at renefournier.com
Mon Sep 10 11:39:12 PDT 2012


I've written a script to migrate location data from MySQL to PostGIS.
Each region contains 5-20 locations. I would like my script to create a simple polygon for each region that encompasses its locations (lat/lng points). I say simple in the sense of not too many vertices (< 10), even if the region contains 20 points.(The easiest thing would be a bounding box, but I would like it a bit more defined than that.)  Additionally, I would like the polygon to be a bit bigger (say, by 10 meters) than the points it contains. 

Just wondering if this is something that can be done in a PostGIS query or PHP using some algorithm for simple. What would you recommend? Thanks!

...Rene


More information about the postgis-users mailing list