Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I get the ConvexHull of a set of polygons using ST_UNION and ST_CONVEXHULL functions using PostGIS. I want to know how to create an outward buffer of the created convexhull in PostGIS?

share|improve this question
up vote 6 down vote accepted

ST_ConvexHull() returns a Polygon. Using ST_Buffer() on the result will create an "outward" buffer.

SELECT ST_As_Text(ST_Buffer(ST_ConvexHull(ST_Union(the_geom)), 1)) FROM building_poly;
share|improve this answer
I used this query but it asks for some casting: SELECT ST_As_Text (ST_Buffer (foo, 1)) from (select (ST_ConvexHull(ST_Union(the_geom))) from building_poly) As foo; – Sanjeewa Jul 15 '11 at 10:12
Many thanks. It worked. – Sanjeewa Jul 15 '11 at 14:57
@Sanjeewa Welcome to our site! The best ways to indicate a useful answer are to vote it up and to accept it. That helps future users find it so they too can benefit from the question you have asked here. – whuber Jul 15 '11 at 18:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.