Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
1  
@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
add comment

Your Answer

 
discard

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.