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'm having a bit of trouble with ST_Buffer and join styles. Basically, if I try and use the bevel style it outputs as if I was using the round style.

I notice that the ST_Buffer docs state that GEOS 3.2 or above is needed for bevel to work. I'm using GEOS 3.3.7, but I've also tried downgrading to various GEOS versions (3.3.5, 3.3.0, etc) to no avail.

The only way I've managed to get bevel to work is by using Postgres.app as my PostGIS database instead of my manual homebrew installation. I can't work out why my homebrew version doesn't do it even when they're both using the same GEOS (3.3.5).

Is there something that I'm missing? Perhaps I need to update / do something with my existing PostGIS database after downgrading / changing GEOS?

Update

Basically, what I'm trying to achieve is an expanded polygon (say by 3 metres) with sharp corners. ST_Buffer seems to be the logical choice here. However, I'm happy to explore other options that would a) let me remove the rounded corners after using ST_Buffer, or b) let me use something other than ST_Buffer to achieve the same effect.

share|improve this question
    
How should the algorithm know which corners to make sharp for a polygon? My understanding of the buffer algorithm was that the styles referred to the end-caps of lines, with no special behaviour for closed rings. –  Paul Ramsey Mar 4 '13 at 21:06
add comment

1 Answer

Was your homebrewed PostGIS statically compiled against GEOS? Probably not, but if so, that PostGIS is stuck with a version of GEOS where the bevel doesn't work. To see what version of GEOS PostGIS is using run the following query:

SELECT postgis_full_version();

If it is running against an older version you'll need to recompile PostGIS, and reinstall the extensions. If you're using PostgreSQL 9.1 or greater you can use ALTER EXTENSION to upgrade PostGIS in place.

FYI, on my Ubuntu box the bevel option works just fine with GEOS 3.3.5.

share|improve this answer
    
Thanks for the help. Here is the output of the version query… "POSTGIS="2.0.2 r10789" GEOS="3.3.7-CAPI-1.7.7" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.8" LIBJSON="UNKNOWN"" I've been checking that every time I upgrade GEOS and it always reflects the latest version installed (without using ALTER EXTENSION). –  Robin Hawkes Mar 2 '13 at 11:46
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.