ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 31),1)
TESTS += regress_ogc_prep
+# Styled buffer only if GEOS >= 3.2
+ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1)
+ TESTS += regress_buffer_params
+
+endif
endif
endif
--- /dev/null
+---
+--- Tests for ST_Buffer with parameters (needs GEOS-3.2 or higher)
+---
+---
+
+-- Ouput is snapped to grid to account for small floating numbers
+-- differences between architectures
+SELECT 'point quadsegs=2', astext(SnapToGrid(st_buffer('POINT(0 0)', 1, 'quad_segs=2'), 1.0e-6));
+SELECT 'line quadsegs=2', astext(SnapToGrid(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2'), 1.0e-6));
+SELECT 'line quadsegs=2 endcap=flat', astext(SnapToGrid(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=flat'), 1.0e-6));
+SELECT 'line quadsegs=2 endcap=square', astext(SnapToGrid(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=square'), 1.0e-6));
+SELECT 'poly quadsegs=2 join=round', astext(SnapToGrid(st_buffer('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', 2, 'quad_segs=2 join=round'), 1.0e-6));
+SELECT 'poly quadsegs=2 join=bevel', astext(SnapToGrid(st_buffer('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', 2, 'quad_segs=2 join=bevel'), 1.0e-6));
+SELECT 'poly quadsegs=2 join=mitre', astext(SnapToGrid(st_buffer('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', 2, 'quad_segs=2 join=mitre'), 1.0e-6));
+SELECT 'poly quadsegs=2 join=mitre mitre_limit=1', astext(SnapToGrid(st_buffer('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', 2, 'quad_segs=2 join=mitre mitre_limit=1'), 1.0e-6));
+
--- /dev/null
+point quadsegs=2|POLYGON((1 0,0.707107 -0.707107,0 -1,-0.707107 -0.707107,-1 0,-0.707107 0.707107,0 1,0.707107 0.707107,1 0))
+line quadsegs=2|POLYGON((10 2,11.414214 1.414214,12 0,11.414214 -1.414214,10 -2,0 -2,-1.414214 -1.414214,-2 0,-1.414214 1.414214,0 2,10 2))
+line quadsegs=2 endcap=flat|POLYGON((10 2,10 -2,0 -2,0 2,10 2))
+line quadsegs=2 endcap=square|POLYGON((10 2,12 2,12 -2,0 -2,-2 -2,-2 2,10 2))
+poly quadsegs=2 join=round|POLYGON((-2 0,-2 10,-1.414214 11.414214,0 12,10 12,11.414214 11.414214,12 10,12 0,11.414214 -1.414214,10 -2,0 -2,-1.414214 -1.414214,-2 0))
+poly quadsegs=2 join=bevel|POLYGON((-2 0,-2 10,0 12,10 12,12 10,12 0,10 -2,0 -2,-2 0))
+poly quadsegs=2 join=mitre|POLYGON((-2 -2,-2 12,12 12,12 -2,-2 -2))
+poly quadsegs=2 join=mitre mitre_limit=1|POLYGON((-1.828427 -1,-1.828427 11,-1 11.828427,11 11.828427,11.828427 11,11.828427 -1,11 -1.828427,-1 -1.828427,-1.828427 -1))