'quad_segs=#' : number of segments used to approximate a quarter circle (defaults to 8).
</listitem>
<listitem>
-'endcap=round|flat|square' : endcap style (defaults to "round", needs GEOS-3.2 or higher for a different value).
+'endcap=round|flat|square' : endcap style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'butt' is also accepted as a synonim for 'flat'.
</listitem>
<listitem>
-'join=round|mitre|bevel' : join style (defaults to "round", needs GEOS-3.2 or higher for a different value).
+'join=round|mitre|bevel' : join style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'miter' is also accepted as a synonim for 'mitre'.
</listitem>
<listitem>
-'mitre_limit=#.#' : mitre ratio limit (only affects mitred join style).
+'mitre_limit=#.#' : mitre ratio limit (only affects mitred join style). 'miter_limit' is also accepted as a synonim for 'mitre_limit'.
</listitem>
</itemizedlist>
</para>
{
endCapStyle = ENDCAP_ROUND;
}
- else if ( !strcmp(val, "flat") )
+ else if ( !strcmp(val, "flat") ||
+ !strcmp(val, "butt") )
{
endCapStyle = ENDCAP_FLAT;
}
{
lwerror("Invalid buffer end cap "
"style: %s (accept: "
- "'round', 'flat' or 'square'"
+ "'round', 'flat', 'butt' "
+ "or 'square'"
")", val);
break;
}
{
joinStyle = JOIN_ROUND;
}
- else if ( !strcmp(val, "mitre") )
+ else if ( !strcmp(val, "mitre") ||
+ !strcmp(val, "miter") )
{
joinStyle = JOIN_MITRE;
}
{
lwerror("Invalid buffer end cap "
"style: %s (accept: "
- "'round', 'mitre' or 'bevel'"
+ "'round', 'mitre', 'miter' "
+ " or 'bevel'"
")", val);
break;
}
}
- else if ( !strcmp(key, "mitre_limit") )
+ else if ( !strcmp(key, "mitre_limit") ||
+ !strcmp(key, "miter_limit") )
{
/* mitreLimit is a float */
mitreLimit = atof(val);
else
{
lwerror("Invalid buffer parameter: %s (accept: "
- "'endcap', 'join', 'mitre_limit' and "
+ "'endcap', 'join', 'mitre_limit', "
+ "'miter_limit and "
"'quad_segs')", key);
break;
}
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=butt', astext(SnapToGrid(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=butt'), 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));
+SELECT 'poly quadsegs=2 join=miter miter_limit=1', astext(SnapToGrid(st_buffer('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', 2, 'quad_segs=2 join=miter miter_limit=1'), 1.0e-6));
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=butt|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))
+poly quadsegs=2 join=miter miter_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))