Opened 6 years ago

Closed 6 years ago

#28960 closed New feature (fixed)

Implement GEOS.BufferWithStyle

Reported by: Stanislav Karpov Owned by: Stanislav Karpov
Component: GIS Version: dev
Severity: Normal Keywords: gis, geodjango, geos
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Hello.

I couldn't find a method that allows to specify a style for a new polygon. For example, flat end caps. Other examples with images are available at: http://www.postgis.net/docs/ST_Buffer.html

But I found a similar method in GEOS:

# https://github.com/OSGeo/geos/blob/master/capi/geos_c.h.in#L1442
extern GEOSGeometry GEOS_DLL *GEOSBufferWithStyle(const GEOSGeometry* g,
double width, int quadsegs, int endCapStyle, int joinStyle,
double mitreLimit);

Using flat end caps allows to significantly reduce the number of points in the polygon. For example, a segment of a straight line will only turn into a rectangle, not a polygon with rounded corners.

Change History (5)

comment:1 by Stanislav Karpov, 6 years ago

Owner: changed from nobody to Stanislav Karpov

comment:2 by Sergey Fedoseev, 6 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 6 years ago

Has patch: set
Patch needs improvement: set

PR (with comments for improvement)

comment:4 by Stanislav Karpov, 6 years ago

comment:5 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 6d794fb7:

Fixed #28960 -- Added GEOSGeometry.buffer_with_style().

Note: See TracTickets for help on using tickets.
Back to Top