Opened 3 weeks ago

Last modified 6 days ago

#28960 assigned New feature

Implement GEOS.BufferWithStyle

Reported by: Stanislav Karpov Owned by: Stanislav Karpov
Component: GIS Version: master
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 (4)

comment:1 Changed 3 weeks ago by Stanislav Karpov

Owner: changed from nobody to Stanislav Karpov

comment:2 Changed 3 weeks ago by Sergey Fedoseev

Triage Stage: UnreviewedAccepted

comment:3 Changed 7 days ago by Tim Graham

Has patch: set
Patch needs improvement: set

PR (with comments for improvement)

comment:4 Changed 6 days ago by Stanislav Karpov

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