Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer of a Linestring returns a Polygon with hole artifact #4

Open
nbvfgh opened this issue Jan 9, 2025 · 1 comment
Open

Buffer of a Linestring returns a Polygon with hole artifact #4

nbvfgh opened this issue Jan 9, 2025 · 1 comment
Labels
bug Something isn't working confirmed jts libgeos

Comments

@nbvfgh
Copy link
Owner

nbvfgh commented Jan 9, 2025

ST_Buffer(geometry g1, float radius_of_buffer):
Computes a POLYGON or MULTIPOLYGON that represents all points whose distance from a geometry/geography is less than or equal to a given distance. A negative distance shrinks the geometry rather than expanding it. A negative distance may shrink a polygon completely, in which case POLYGON EMPTY is returned. For points and lines negative distances always return empty results.

Considering following queries:

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (geom geometry);
INSERT INTO t1 VALUES (ST_GeomFromText('LINESTRING (1.6 0.7, 0.7 4.7, 145.6 137.7, 146.3 137.1, 146.3 137, 146.6 136.7)', 0));

SELECT ST_Covers(ST_Buffer(t1.geom, 15), t1.geom) FROM t1;
-- expected: {t}

The buffer has created an unexpected hole.
图片

@nbvfgh
Copy link
Owner Author

nbvfgh commented Jan 9, 2025

bug tracker: libgeos/geos#1217

@nbvfgh nbvfgh added bug Something isn't working confirmed libgeos jts labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed jts libgeos
Projects
None yet
Development

No branches or pull requests

1 participant