#340 closed enhancement (wontfix)
Buffer creates artefact with flat endcap [JTS fails too]
Reported by: | barendgehrels | Owned by: | strk |
---|---|---|---|
Priority: | minor | Milestone: | Upstream |
Component: | Core | Version: | main |
Severity: | Unassigned | Keywords: | buffer |
Cc: |
Description
Hi,
A buffer of a quite simple linestring, using endcap=flat, creates two artefacts at the top.
The PostGIS SQL command to reproduce this is:
select ST_AsText(ST_Buffer(ST_GeomFromText('LINESTRING(2 7,3 5,5 4,7 5,8 7)'), 5, 'endcap=flat'));
I've not tested this particular case in GEOS, but have seen similar artefacts originating from GEOS, so suspect GEOS will generate this.
How a buffer with endcap=flat would ideally look like, I'm not sure of, because as soon as a buffer is not having round endcaps and joins, it is not mathematically defined, AFAIK, so the behaviour is more or less up to the implementation. In this case the buffer distance is larger as the vertex distances, so this is probably the cause of this artefact. Anyway, I'm calling it artefact because it's looking strange.
I'm implementing a buffer as well (Boost.Geometry), and especially currently need an asymmetric buffer distance (left/right different) AND end-cap, and the results are different (but also not yet satisfactory).
Regards, Barend
Attachments (1)
Change History (11)
comment:1 by , 13 years ago
Milestone: | → GEOS Future |
---|---|
Version: | 3.2.0 → svn-trunk |
by , 13 years ago
Attachment: | flatbuffer.png added |
---|
comment:2 by , 13 years ago
Milestone: | GEOS Future → 3.4.0 |
---|---|
Summary: | Buffer creates artefact with flat endcap → Buffer creates artefact with flat endcap [JTS fails too] |
comment:3 by , 11 years ago
Milestone: | 3.4.0 → 3.5.0 |
---|
I'm going to assume JTS still fails since I don't have JTS to test with. Push back if this is an easy fix.
comment:6 by , 6 years ago
Milestone: | 3.7.0 → GEOS Fund Me |
---|
comment:7 by , 4 years ago
Milestone: | GEOS Fund Me → Upstream |
---|
comment:8 by , 7 months ago
As the OP observes, the "expected" value of a buffer with flat endcaps and a large buffer distance is not really well-defined. In the absence of a definition, it's not possible to determine how to improve the current result.
comment:9 by , 7 months ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This would be best discussed with Martin Davis, as JTS is what drives GEOS.